From lbourges at openjdk.org Sun Oct 1 20:50:28 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Sun, 1 Oct 2023 20:50:28 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes Message-ID: For stroked shapes (no Renderer use), the min-join-error check is disabled. Added new jtreg test to verify join using pixel counts ------------- Commit messages: - fixed line endings - JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes by disabling the min-join-error check for stroked shapes Changes: https://git.openjdk.org/jdk/pull/16002/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16002&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316741 Stats: 137 lines in 5 files changed: 118 ins; 1 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/16002.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16002/head:pull/16002 PR: https://git.openjdk.org/jdk/pull/16002 From itakiguchi at openjdk.org Mon Oct 2 13:35:16 2023 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Mon, 2 Oct 2023 13:35:16 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v7] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 16:21:05 GMT, Ichiroh Takiguchi wrote: >> "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" >> https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf >> It refers windgi.h >> https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica >> >> Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) >> >> Additional change: >> Special character `\line` should `\n` >> >> Additional information: >> >> Add 2 hash tables >> - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name >> - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` >> >> When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. >> When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. >> If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. >> >> If `f` control word is used without `fcharset`, `translationTable` char array is used. >> If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). >> >> **Note:** Following GitHub actions were failed >> linux-cross-compile / build (riscv64), I opened following JBS. >>> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed > > Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision: > > 6928542: Chinese characters in RTF are not decoded Gentle reminder, I need another reviewer for this issue. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13553#issuecomment-1743024438 From aivanov at openjdk.org Mon Oct 2 18:52:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 2 Oct 2023 18:52:19 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v4] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 12:34:12 GMT, Christopher Sahnwaldt wrote: >> In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak > > Christopher Sahnwaldt has updated the pull request incrementally with one additional commit since the last revision: > > SwingWorkerExecutorLeakTest.java: use AppContext.getAppContext() instead of SunToolkit.createNewAppContext() to create AppContext, set necessary system properties > Maybe this issue is a non-issue. Someone who knows how `AppContext` is currently used should check. > > I just found [this comment](https://bugs.openjdk.org/browse/JDK-8289616?focusedCommentId=14516108#comment-14516108) by @prrace: "AppContext.dispose() is no longer called from anywhere in JDK code." So as I explained in my previous comment, this is a non-issue. I'll close it. Likely, it's not an issue any more. `AppContext` was used to isolate different applets which run in the same JVM as well as to isolate the deployment stack (Java Console as an example) from applets and Java Web Start apps. As the comment you linked to explains, there should never be more than one `AppContext` and its `dispose()` method is never called. > I guess such a situation only occurs if an application starts a GUI, later shuts down the GUI, but keeps the JVM running. Should be pretty rare. I think so. GUI application usually has its GUI throughout its entire lifespan. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1743576856 From achung at openjdk.org Mon Oct 2 21:46:51 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 2 Oct 2023 21:46:51 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: remove util ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/7e1a7f4f..a650890e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=05-06 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From honkar at openjdk.org Mon Oct 2 22:13:48 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 2 Oct 2023 22:13:48 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 21:46:51 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > remove util Changes requested by honkar (Committer). @alisenchung Looks like `Util.blockTillDisplayed(mainFrame)` has been removed which was causing compilation issues earlier. Now the updated test works correctly. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 30: > 28: * @library ../regtesthelpers /test/lib > 29: * @build JRobot > 30: * @build jtreg.SkippedException Suggestion: * @library /test/lib * @build jtreg.SkippedException JRobot is not required for this test, it can be replaced with normal Robot calls and jtreg header can be modified as above. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1653583674 PR Comment: https://git.openjdk.org/jdk/pull/15875#issuecomment-1743835513 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1343208553 From dnguyen at openjdk.org Mon Oct 2 22:17:33 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 2 Oct 2023 22:17:33 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 22:05:04 GMT, Harshitha Onkar wrote: > @alisenchung Looks like `Util.blockTillDisplayed(mainFrame)` has been removed which was causing compilation issues earlier. Now the updated test works correctly. Yep. This sounds correct. I did something similar here in [bug4703690.java](https://github.com/openjdk/jdk/pull/15747/files) in #15747. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15875#issuecomment-1743845186 From honkar at openjdk.org Mon Oct 2 22:24:22 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 2 Oct 2023 22:24:22 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 22:03:21 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> remove util > > test/jdk/javax/swing/ToolTipManager/bug5078214.java line 30: > >> 28: * @library ../regtesthelpers /test/lib >> 29: * @build JRobot >> 30: * @build jtreg.SkippedException > > Suggestion: > > * @library /test/lib > * @build jtreg.SkippedException > > JRobot is not required for this test, it can be replaced with normal Robot calls and jtreg header can be modified as above. As per convention it is better to place the `@key headful` at the start after `@test or @bug`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1343219354 From achung at openjdk.org Mon Oct 2 22:58:52 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 2 Oct 2023 22:58:52 GMT Subject: RFR: 8316146: Open some swing tests 4 [v8] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: remove jrobot replace with robot ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/a650890e..92ac36be Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=06-07 Stats: 4 lines in 1 file changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From honkar at openjdk.org Mon Oct 2 23:04:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 2 Oct 2023 23:04:40 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 22:21:23 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/ToolTipManager/bug5078214.java line 30: >> >>> 28: * @library ../regtesthelpers /test/lib >>> 29: * @build JRobot >>> 30: * @build jtreg.SkippedException >> >> Suggestion: >> >> * @library /test/lib >> * @build jtreg.SkippedException >> >> JRobot is not required for this test, it can be replaced with normal Robot calls and jtreg header can be modified as above. > > As per convention it is better to place the `@key headful` at the start after `@test or @bug`. @alisenchung You missed removing `../regtesthelpers` from @library tag :) Also please move the @key tag as suggested above. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1343241226 From dnguyen at openjdk.org Mon Oct 2 23:15:03 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 2 Oct 2023 23:15:03 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out Message-ID: This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. ------------- Commit messages: - Update for stability. Add delay and timeout. Changes: https://git.openjdk.org/jdk/pull/16018/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315484 Stats: 14 lines in 1 file changed: 5 ins; 2 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From honkar at openjdk.org Mon Oct 2 23:45:37 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 2 Oct 2023 23:45:37 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 23:06:58 GMT, Damon Nguyen wrote: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 84: > 82: DnDConstants.ACTION_COPY, dgl); > 83: frame.setPreferredSize(new Dimension(200, 200)); > 84: frame.pack(); Suggestion: frame.setSize(200, 200); frame.pack() not required as frame size is explicitly specified. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1343256884 From dnguyen at openjdk.org Mon Oct 2 23:51:04 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 2 Oct 2023 23:51:04 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove pack for explicit size ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/e74ddc92..2024f6bc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From dnguyen at openjdk.org Mon Oct 2 23:51:05 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 2 Oct 2023 23:51:05 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 23:33:44 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove pack for explicit size > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 84: > >> 82: DnDConstants.ACTION_COPY, dgl); >> 83: frame.setPreferredSize(new Dimension(200, 200)); >> 84: frame.pack(); > > Suggestion: > > frame.setSize(200, 200); > > frame.pack() not required as frame size is explicitly specified. Good call. Was testing out different changes, and this was leftover. Modified back to setSize. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1343262209 From honkar at openjdk.org Mon Oct 2 23:59:36 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 2 Oct 2023 23:59:36 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: References: Message-ID: <5O_gb0hEcGOfAXgXnz0P9--DxhGrG8NCYH_gZHiFj-c=.af55c7b3-a315-4c9e-b1fc-8061538a84e4@github.com> On Mon, 2 Oct 2023 23:51:04 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove pack for explicit size test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 90: > 88: Robot robot = new Robot(); > 89: robot.waitForIdle(); > 90: robot.delay(DELAY_TIME); Does adding `robot.autoWaitForIdle(true)` additionally increase the stability of the test since it has subsequent DnD events performed by the robot? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1343266692 From honkar at openjdk.org Tue Oct 3 00:20:43 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 3 Oct 2023 00:20:43 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 05:05:07 GMT, Prasanta Sadhukhan wrote: >> Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15677#pullrequestreview-1653836045 From achung at openjdk.org Tue Oct 3 02:44:59 2023 From: achung at openjdk.org (Alisen Chung) Date: Tue, 3 Oct 2023 02:44:59 GMT Subject: RFR: 8316146: Open some swing tests 4 [v9] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fixed jtreg header ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/92ac36be..b7b404de Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=07-08 Stats: 3 lines in 1 file changed: 1 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From azvegint at openjdk.org Tue Oct 3 10:38:50 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 3 Oct 2023 10:38:50 GMT Subject: RFR: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 Message-ID: The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale. This changeset includes: * sun.java2d.uiScale value is now taken into account * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system. Now we take that into account and resize the image accordingly. * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution. * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported. Following tests are no longer failing on Wayland: java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling). ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/16027/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16027&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8309621 Stats: 235 lines in 8 files changed: 168 ins; 48 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/16027.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16027/head:pull/16027 PR: https://git.openjdk.org/jdk/pull/16027 From duke at openjdk.org Tue Oct 3 10:50:32 2023 From: duke at openjdk.org (Ravi Gupta) Date: Tue, 3 Oct 2023 10:50:32 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly In-Reply-To: References: Message-ID: On Thu, 28 Sep 2023 11:18:16 GMT, Ravi Gupta wrote: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Any volunteers for a review? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15961#issuecomment-1744712622 From aivanov at openjdk.org Tue Oct 3 14:06:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 14:06:43 GMT Subject: RFR: 8316146: Open some swing tests 4 [v9] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 02:44:59 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed jtreg header Changes requested by aivanov (Reviewer). test/jdk/javax/swing/ToolTipManager/bug5078214.java line 31: > 29: * @build jtreg.SkippedException > 30: * @run main bug5078214 > 31: */ The test does not compile: runner starting test: javax/swing/ToolTipManager/bug5078214.java runner finished test: javax/swing/ToolTipManager/bug5078214.java Error. can't find jtreg.SkippedException in test directory or libraries Test results: error: 1 You still use **`/test/lib`** for `jtreg.SkippedException`. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1655261619 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1344137620 From aivanov at openjdk.org Tue Oct 3 14:06:46 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 14:06:46 GMT Subject: RFR: 8316146: Open some swing tests 4 [v6] In-Reply-To: <21qfi3MpGO2LKFCGC6zA_k_FxaxrQSs6ujzUz6CqBvY=.55774a77-6cc6-4141-a2ff-52ae8481ea9c@github.com> References: <21qfi3MpGO2LKFCGC6zA_k_FxaxrQSs6ujzUz6CqBvY=.55774a77-6cc6-4141-a2ff-52ae8481ea9c@github.com> Message-ID: On Fri, 29 Sep 2023 19:27:33 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> fixed skippedexception, fixed comment > > test/jdk/javax/swing/ToolTipManager/bug5078214.java line 66: > >> 64: "with the taskbar at the bottom position."); >> 65: } >> 66: bounds = getGraphicsConfig().getBounds(); > > It's better to use the pattern that was used before: assign the result of `getGraphicsConfig()` to `testConfig` because `getGraphicsConfig()` is not a simple getter which returns the value of a field. On the other hand, it's more like premature optimisation; it's unlikely that enumerating screens takes a lot of time, especially now when you use the default config only. It's marked resolved but I can't see any related changes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1344164215 From aivanov at openjdk.org Tue Oct 3 14:09:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 14:09:39 GMT Subject: RFR: 8316146: Open some swing tests 4 [v9] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 02:44:59 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed jtreg header test/jdk/javax/swing/ToolTipManager/bug5078214.java line 1: > 1: /* Interestingly, the test now shows the UI on secondary screen for me. It's not a problem, the test passes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1344170795 From aivanov at openjdk.org Tue Oct 3 14:19:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 14:19:49 GMT Subject: RFR: 8316146: Open some swing tests 4 [v7] In-Reply-To: References: Message-ID: On Mon, 2 Oct 2023 22:14:50 GMT, Damon Nguyen wrote: > @alisenchung Looks like `Util.blockTillDisplayed(mainFrame)` has been removed which was causing compilation issues earlier. Now the updated test works correctly. Ah, the test didn't compile earlier? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15875#issuecomment-1745073650 From honkar at openjdk.org Tue Oct 3 16:37:51 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 3 Oct 2023 16:37:51 GMT Subject: RFR: 8316146: Open some swing tests 4 [v9] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 13:47:23 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> fixed jtreg header > > test/jdk/javax/swing/ToolTipManager/bug5078214.java line 31: > >> 29: * @build jtreg.SkippedException >> 30: * @run main bug5078214 >> 31: */ > > The test does not compile: > > runner starting test: javax/swing/ToolTipManager/bug5078214.java > runner finished test: javax/swing/ToolTipManager/bug5078214.java > Error. can't find jtreg.SkippedException in test directory or libraries > Test results: error: 1 > > > You still use **`/test/lib`** for `jtreg.SkippedException`. @alisenchung Previously what I meant is remove only `../regtesthelpers` and retain `/test/lib` in @library tag. Your jtreg header should look something like below. /* * @test * @bug 5078214 * @key headful * @summary ToolTip is shown partially when the application is near the bottom of screen. * @library /test/lib * @build jtreg.SkippedException * @run main bug5078214 */ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1344412829 From dnguyen at openjdk.org Tue Oct 3 18:09:03 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 18:09:03 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add setAutoWaitForIdle ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/2024f6bc..db1ac5cf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From dnguyen at openjdk.org Tue Oct 3 18:09:04 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 18:09:04 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: <5O_gb0hEcGOfAXgXnz0P9--DxhGrG8NCYH_gZHiFj-c=.af55c7b3-a315-4c9e-b1fc-8061538a84e4@github.com> References: <5O_gb0hEcGOfAXgXnz0P9--DxhGrG8NCYH_gZHiFj-c=.af55c7b3-a315-4c9e-b1fc-8061538a84e4@github.com> Message-ID: On Mon, 2 Oct 2023 23:56:12 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove pack for explicit size > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 90: > >> 88: Robot robot = new Robot(); >> 89: robot.waitForIdle(); >> 90: robot.delay(DELAY_TIME); > > Does adding `robot.autoWaitForIdle(true)` additionally increase the stability of the test since it has subsequent DnD events performed by the robot? Sure, I just added it. Previously when I initially worked on this test, setAutoWaitForIdle had a weird interaction with how the test was setup. Since the test used a delay of 50ms between each of the movements when dragging the selection, it caused long delays. Looks like this is resolved now, and the method doesn't add any unreasonable delays anymore. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344515836 From honkar at openjdk.org Tue Oct 3 18:11:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 3 Oct 2023 18:11:39 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 18:09:03 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/16018#pullrequestreview-1655832081 From honkar at openjdk.org Tue Oct 3 18:11:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 3 Oct 2023 18:11:39 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: References: <5O_gb0hEcGOfAXgXnz0P9--DxhGrG8NCYH_gZHiFj-c=.af55c7b3-a315-4c9e-b1fc-8061538a84e4@github.com> Message-ID: On Tue, 3 Oct 2023 17:59:19 GMT, Damon Nguyen wrote: >> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 90: >> >>> 88: Robot robot = new Robot(); >>> 89: robot.waitForIdle(); >>> 90: robot.delay(DELAY_TIME); >> >> Does adding `robot.autoWaitForIdle(true)` additionally increase the stability of the test since it has subsequent DnD events performed by the robot? > > Sure, I just added it. Previously when I initially worked on this test, setAutoWaitForIdle had a weird interaction with how the test was setup. Since the test used a delay of 50ms between each of the movements when dragging the selection, it caused long delays. Looks like this is resolved now, and the method doesn't add any unreasonable delays anymore. Sounds good! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344525247 From aivanov at openjdk.org Tue Oct 3 20:25:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 20:25:40 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: Message-ID: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> On Tue, 3 Oct 2023 18:09:03 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 1: > 1: /* I've got questions whether all the AWT resources are released. When the test fails with timeout, the screen shot does not have the frame, it displays an empty desktop. The stack trace for the main thread: java.base/java.lang.Object.wait0(Native Method) java.base/java.lang.Object.wait(Object.java:375) java.base/java.lang.Thread.join(Thread.java:2045) java.base/java.lang.Thread.join(Thread.java:2121) java.base/java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:114) java.base/java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:47) java.base/java.lang.Shutdown.runHooks(Shutdown.java:130) java.base/java.lang.Shutdown.exit(Shutdown.java:167) java.base/java.lang.Runtime.exit(Runtime.java:188) java.base/java.lang.System.exit(System.java:1920) com.sun.javatest.regtest.agent.AStatus.exit(AStatus.java:198) com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:95)" That is the main method of the test class terminated. Yet JVM does not exit for whatever reason. At the same time, the thread dump contains both `AWT-Windows` and `AWT-EventQueue-0` threads, which means AWT prevents the JVM from exiting. Why? I have no clue. Will removing the mouse listeners from the frame let it be disposed of? if (frame != null) { frame.removeMouseListener((MouseListener) dgr); frame.removeMouseMotionListener((MouseMotionListener) dgr); frame.dispose(); } Although the changes that you've made make the test faster, it may still time out unless we find the root cause. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 88: > 86: > 87: try { > 88: Robot robot = new Robot(); To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 89: > 87: try { > 88: Robot robot = new Robot(); > 89: robot.setAutoWaitForIdle(true); Now that you set `autoWaitForIdle`, the delay inside the loop is redundant ? waiting for idle after sending each event delays the execution even more. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 91: > 89: robot.setAutoWaitForIdle(true); > 90: robot.waitForIdle(); > 91: robot.delay(DELAY_TIME); To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. `DELAY_TIME` could be set to `500` or even less. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 99: > 97: > 98: robot.delay(DELAY_TIME); > 99: The delay here is unnecessary, nothing has changed after the initial delay. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 102: > 100: robot.mouseMove(startPoint.x, startPoint.y); > 101: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); > 102: for (Point p = new Point(startPoint); !p.equals(endPoint); The `for` loop may also verify the value of `incorrectActionDetected` and break if it becomes `true`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344694558 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344643970 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344648294 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344645185 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344646235 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344649760 From aivanov at openjdk.org Tue Oct 3 20:33:09 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 20:33:09 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v2] In-Reply-To: References: <5O_gb0hEcGOfAXgXnz0P9--DxhGrG8NCYH_gZHiFj-c=.af55c7b3-a315-4c9e-b1fc-8061538a84e4@github.com> Message-ID: On Tue, 3 Oct 2023 18:08:16 GMT, Harshitha Onkar wrote: >> Sure, I just added it. Previously when I initially worked on this test, setAutoWaitForIdle had a weird interaction with how the test was setup. Since the test used a delay of 50ms between each of the movements when dragging the selection, it caused long delays. Looks like this is resolved now, and the method doesn't add any unreasonable delays anymore. > > Sounds good! > Since the test used a delay of 50ms between each of the movements when dragging the selection, it caused long delays. As far as I can see, the test still uses it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344701813 From aivanov at openjdk.org Tue Oct 3 20:40:47 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Oct 2023 20:40:47 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 05:05:07 GMT, Prasanta Sadhukhan wrote: >> Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 56: > 54: String systemLAF = UIManager.getSystemLookAndFeelClassName(); > 55: // the test is not applicable to Motif L&F > 56: if (systemLAF.endsWith("MotifLookAndFeel")){ Suggestion: if (systemLAF.endsWith("MotifLookAndFeel")) { ------------- PR Review: https://git.openjdk.org/jdk/pull/15677#pullrequestreview-1656078503 PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1344704658 From prr at openjdk.org Tue Oct 3 21:27:25 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 3 Oct 2023 21:27:25 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 05:05:07 GMT, Prasanta Sadhukhan wrote: >> Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 83: > 81: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > 82: robot.waitForIdle(); > 83: robot.delay(250); These don't help on the system I have tested on. There's something else going on. The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. I don't think it does. If I comment out the press/release the same exception occurs. And visually you can see the menu disappear and then reappear. What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. It only happens once .. very odd .. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1344761217 From achung at openjdk.org Tue Oct 3 21:57:42 2023 From: achung at openjdk.org (Alisen Chung) Date: Tue, 3 Oct 2023 21:57:42 GMT Subject: RFR: 8316146: Open some swing tests 4 [v10] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fixed jtreg header ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/b7b404de..f93c252c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=08-09 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From achung at openjdk.org Tue Oct 3 21:57:45 2023 From: achung at openjdk.org (Alisen Chung) Date: Tue, 3 Oct 2023 21:57:45 GMT Subject: RFR: 8316146: Open some swing tests 4 [v9] In-Reply-To: References: Message-ID: <030lq-7aU3EwBXyQ5DsrnSJgQ8VogbySRnXtsSIuEeU=.89e2eefe-ae26-4fdb-a66a-5dd51f440945@github.com> On Tue, 3 Oct 2023 02:44:59 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed jtreg header testing is green now on mach5 ------------- PR Comment: https://git.openjdk.org/jdk/pull/15875#issuecomment-1745783421 From dnguyen at openjdk.org Tue Oct 3 22:41:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 22:41:45 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Tue, 3 Oct 2023 20:23:20 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add setAutoWaitForIdle > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 1: > >> 1: /* > > I've got questions whether all the AWT resources are released. > > When the test fails with timeout, the screen shot does not have the frame, it displays an empty desktop. > > The stack trace for the main thread: > > > java.base/java.lang.Object.wait0(Native Method) > java.base/java.lang.Object.wait(Object.java:375) > java.base/java.lang.Thread.join(Thread.java:2045) > java.base/java.lang.Thread.join(Thread.java:2121) > java.base/java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:114) > java.base/java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:47) > java.base/java.lang.Shutdown.runHooks(Shutdown.java:130) > java.base/java.lang.Shutdown.exit(Shutdown.java:167) > java.base/java.lang.Runtime.exit(Runtime.java:188) > java.base/java.lang.System.exit(System.java:1920) > com.sun.javatest.regtest.agent.AStatus.exit(AStatus.java:198) > com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:95)" > > > That is the main method of the test class terminated. Yet JVM does not exit for whatever reason. > > At the same time, the thread dump contains both `AWT-Windows` and `AWT-EventQueue-0` threads, which means AWT prevents the JVM from exiting. Why? I have no clue. > > Will removing the mouse listeners from the frame let it be disposed of? > > if (frame != null) { > frame.removeMouseListener((MouseListener) dgr); > frame.removeMouseMotionListener((MouseMotionListener) dgr); > frame.dispose(); > } > > > Although the changes that you've made make the test faster, it may still time out unless we find the root cause. Interesting, let me look into this quickly. Didn't notice this. > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 89: > >> 87: try { >> 88: Robot robot = new Robot(); >> 89: robot.setAutoWaitForIdle(true); > > Now that you set `autoWaitForIdle`, the delay inside the loop is redundant ? waiting for idle after sending each event delays the execution even more. Removed, thanks! > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 91: > >> 89: robot.setAutoWaitForIdle(true); >> 90: robot.waitForIdle(); >> 91: robot.delay(DELAY_TIME); > > To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. > > `DELAY_TIME` could be set to `500` or even less. I reduced the `DELAY_TIME` to 500. Thanks for the suggestion. I got used to setting the default delay times to 1000 for these types of tests, and am trying to break the habit and reduce delays further to 500 where possible. > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 99: > >> 97: >> 98: robot.delay(DELAY_TIME); >> 99: > > The delay here is unnecessary, nothing has changed after the initial delay. Removed, thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344821938 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344824016 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344823824 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344823927 From dnguyen at openjdk.org Tue Oct 3 22:41:37 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 22:41:37 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v4] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary delay. Modify delay amount. Add break. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/db1ac5cf..9bb16957 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=02-03 Stats: 7 lines in 1 file changed: 3 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From dnguyen at openjdk.org Tue Oct 3 22:42:09 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 22:42:09 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: <1Q2t7AFStHLNddNVWFBd9rGBDuTywWm7-G_jI990Z6o=.8adbdad7-c080-4a92-963e-618af6b093be@github.com> On Tue, 3 Oct 2023 19:48:06 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add setAutoWaitForIdle > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 102: > >> 100: robot.mouseMove(startPoint.x, startPoint.y); >> 101: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); >> 102: for (Point p = new Point(startPoint); !p.equals(endPoint); > > The `for` loop may also verify the value of `incorrectActionDetected` and break if it becomes `true`. I believe I added the change requested. I see that `incorrectActionDetected` is updated with `dragOver`. Let me know if this isn't exactly what you had in mind. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344825707 From dnguyen at openjdk.org Tue Oct 3 22:51:57 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 3 Oct 2023 22:51:57 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Tue, 3 Oct 2023 19:42:44 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add setAutoWaitForIdle > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 88: > >> 86: >> 87: try { >> 88: Robot robot = new Robot(); > > To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. Sure can do. Is this to replace the initial `waitForIdle` after robot's creation? So, remove the `waitForIdle` and add `latch.await()` before robot's creation? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1344835661 From psadhukhan at openjdk.org Wed Oct 4 02:59:30 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 02:59:30 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 21:24:59 GMT, Phil Race wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Add setAutoWaitForIdle > > test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 83: > >> 81: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); >> 82: robot.waitForIdle(); >> 83: robot.delay(250); > > These don't help on the system I have tested on. > There's something else going on. > The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. > I don't think it does. If I comment out the press/release the same exception occurs. > And visually you can see the menu disappear and then reappear. > What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. > It only happens once .. very odd .. Can you please tell which system it is not working? I guess harshita and vitaly tested on macos14 and it worked for them and I tested on other mac13,windows10 locally where it also worked, as well as in mach5 systems, whose link I have put in JBS. I also have seen the menu disappear while clicking but it does not cause the test to fail..I saw the video recording vitaly uploaded in JBS and it is same as in macos13 where it pass always (we also dont see any failure for this test in CI runs so far) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345112716 From duke at openjdk.org Wed Oct 4 05:24:31 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 4 Oct 2023 05:24:31 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v9] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Manual test added ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/e9532a64..77635427 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=07-08 Stats: 144 lines in 1 file changed: 144 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From duke at openjdk.org Wed Oct 4 05:37:10 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 4 Oct 2023 05:37:10 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v10] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: File permission updated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/77635427..df9f5d70 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=08-09 Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From duke at openjdk.org Wed Oct 4 05:37:10 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 4 Oct 2023 05:37:10 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v6] In-Reply-To: <0BStTZFnwsDI7fH50e6MnxwGkJCR4zLz2XEw0aO_R8c=.c7547ea2-70cc-4fd8-9ed4-47b30d2fdd3b@github.com> References: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> <0BStTZFnwsDI7fH50e6MnxwGkJCR4zLz2XEw0aO_R8c=.c7547ea2-70cc-4fd8-9ed4-47b30d2fdd3b@github.com> Message-ID: On Fri, 15 Sep 2023 18:36:18 GMT, Alexey Ivanov wrote: >> Did further investigation on JDK-7116070 (name truncation issue) and found its [MS structure](https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/extended-capabilities-from-a-wdm-audio-driver) limitation, this structure can accommodate max 31 char only for _szPname_ . >> >> Workflow : >> **PLATFORM_API_WinOS_Ports.c** loading the description with the help of _mixerGetDevCapsW_ function and result will be stored into the [MIXERCAPSW](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-mixercapsw) structure and in this max size for _szPname_ is 31 char. >> In my analysis this is a limitation and we can't do anything more, let me know if you are aware any alternative solution for this. > > @Renjithkannath Could you please add a manual test for this issue? You can use the sample attached to the JBS issue as the base for the test. @aivanov-jdk, Thank you for your review and suggestion I have added a manual test case for evaluation. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1746164903 From psadhukhan at openjdk.org Wed Oct 4 05:48:59 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 05:48:59 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: > SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. > > JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` > > so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Register listener before component add ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15960/files - new: https://git.openjdk.org/jdk/pull/15960/files/825457fc..2c40b865 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=00-01 Stats: 22 lines in 1 file changed: 18 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15960.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15960/head:pull/15960 PR: https://git.openjdk.org/jdk/pull/15960 From psadhukhan at openjdk.org Wed Oct 4 05:49:43 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 05:49:43 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed In-Reply-To: References: Message-ID: On Thu, 28 Sep 2023 09:43:25 GMT, Prasanta Sadhukhan wrote: > SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. > > JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` > > so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. Fix is updated to register listener before component is added/removed. @andy-goryachev-oracle @aghaisas Can you please review this FX fix? There is some SwingNode rendering issue still due to [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) but size update issue should be fixed.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1746177697 From tr at openjdk.org Wed Oct 4 06:24:43 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 4 Oct 2023 06:24:43 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly In-Reply-To: References: Message-ID: <_FG9GltqBhy7V8dduxg-mZBG_lcUa1-cgCz-p6DvcIU=.e487022a-1ce3-4c4d-bb86-031437ed7462@github.com> On Thu, 28 Sep 2023 11:18:16 GMT, Ravi Gupta wrote: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Looks good. ------------- Marked as reviewed by tr (Committer). PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1656742175 From psadhukhan at openjdk.org Wed Oct 4 08:41:46 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 08:41:46 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> On Wed, 4 Oct 2023 02:52:19 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 83: >> >>> 81: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); >>> 82: robot.waitForIdle(); >>> 83: robot.delay(250); >> >> These don't help on the system I have tested on. >> There's something else going on. >> The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. >> I don't think it does. If I comment out the press/release the same exception occurs. >> And visually you can see the menu disappear and then reappear. >> What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. >> It only happens once .. very odd .. > > Can you please tell which system it is not working? > I guess harshita and vitaly tested on macos14 and it worked for them and I tested on other mac13,windows10 locally where it also worked, as well as in mach5 systems, whose link I have put in JBS. > > I also have seen the menu disappear while clicking but it does not cause the test to fail..I saw the video recording vitaly uploaded in JBS and it is same as in macos13 where it pass always (we also dont see any failure for this test in CI runs so far) Add a delay to make it work on mach5 mac14 system. Tested for 50 iterations, link in JBS ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345414614 From psadhukhan at openjdk.org Wed Oct 4 08:41:44 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 08:41:44 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v3] In-Reply-To: References: Message-ID: > Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. > Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. > > Test passed in several iterations in all platforms. Link in JBS Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add delay ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15677/files - new: https://git.openjdk.org/jdk/pull/15677/files/b5861ef5..f270b9e5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=01-02 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15677/head:pull/15677 PR: https://git.openjdk.org/jdk/pull/15677 From psadhukhan at openjdk.org Wed Oct 4 09:30:55 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 09:30:55 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: Message-ID: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> > Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. > Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. > > Test passed in several iterations in all platforms. Link in JBS Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: jcheck ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15677/files - new: https://git.openjdk.org/jdk/pull/15677/files/f270b9e5..291706fd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15677/head:pull/15677 PR: https://git.openjdk.org/jdk/pull/15677 From aivanov at openjdk.org Wed Oct 4 10:32:36 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 10:32:36 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> References: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> Message-ID: <8MGnvq6CRMT3yAp1UHKkFo_5XnGxtDAaFWnuFaDycBM=.58909c5f-ab2e-47f6-80b0-a36ab6b36696@github.com> On Wed, 4 Oct 2023 08:32:31 GMT, Prasanta Sadhukhan wrote: >> Can you please tell which system it is not working? >> I guess harshita and vitaly tested on macos14 and it worked for them and I tested on other mac13,windows10 locally where it also worked, as well as in mach5 systems, whose link I have put in JBS. >> >> I also have seen the menu disappear while clicking but it does not cause the test to fail..I saw the video recording vitaly uploaded in JBS and it is same as in macos13 where it pass always (we also dont see any failure for this test in CI runs so far) > > Add a delay to make it work on mach5 mac14 system. Tested for 50 iterations, link in JBS > I also have seen the menu disappear while clicking but it does not cause the test to fail..I saw the video recording vitaly uploaded in JBS and it is same as in macos13 where it pass always (we also dont see any failure for this test in CI runs so far) But the menu should not disappear if a greyed out item is clicked. If you see it, you should address this problem. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345572539 From aivanov at openjdk.org Wed Oct 4 11:10:37 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 11:10:37 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Wed, 4 Oct 2023 09:30:55 GMT, Prasanta Sadhukhan wrote: >> Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > jcheck Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 1: > 1: /* I looked at the test code more thoroughly. I guess it can be improved. Since GitHub doesn't allow adding comments to lines which weren't modified, I'll add my comment here. **The first case** is straightforward: 1. Click the menu on the menu bar to open it, 2. Click the greyed out menu item. The test saves the location of menu into `point`, then replaces it with location of the menu item. Yet it does request the same positions later in the test where it saves them into `menuLocation` and `itemLocation` correspondingly. Why not do it right away? The positions shouldn't change. Anyway the test relies on this fact because it saves the positions before the menu gets hidden. **The second case** tests mouse drag. It simulates clicking the menu to open its popup and then dragging the mouse to the menu item and then releasing the mouse button. Here it's more confusing? If you save the values in the first case above, you can clean up the code. Then closing the menu could be done *before* entering the block of code for dragging mouse. In my opinion, it will make the test code clearer. test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 92: > 90: point = Util.getCenterPoint(menu); > 91: robot.mouseMove(point.x, point.y); > 92: robot.delay(250); This delay may help. I saw that moving mouse takes a bit of time on macOS, the following code heavily depends on the mouse being in the expected position. You may assert that mouse cursor is at the expected position. On the other hand, mouse press and further movements shouldn't precede the first mouse move event. If it happens, it could be a bug in macOS. Thus I can't see how this can lead to the test failure. Which case does the test fail by the way? Is it the first or the second? ------------- PR Review: https://git.openjdk.org/jdk/pull/15677#pullrequestreview-1657258616 PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345609705 PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345616470 From aivanov at openjdk.org Wed Oct 4 11:31:37 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 11:31:37 GMT Subject: RFR: 8316146: Open some swing tests 4 [v10] In-Reply-To: References: Message-ID: <6OZU8jOLUg_8bV0Dvdnq4we86Qi1Xm8Usrs8_lt_bLg=.1780a8a8-7ce0-4bd2-bd84-c12f067143ad@github.com> On Tue, 3 Oct 2023 21:57:42 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed jtreg header Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1657303815 From aivanov at openjdk.org Wed Oct 4 11:37:34 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 11:37:34 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v4] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 22:41:37 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary delay. Modify delay amount. Add break. test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 107: > 105: System.err.println("Incorrect action during loop"); > 106: break; > 107: } Actually, I meant adding it as part of the condition in the for-loop itself. However, it works either way. The initial bug report for [JDK-4774532](https://bugs.openjdk.org/browse/JDK-4774532) says `dragOver` shouldn't be called at all. Do we want to update the test for a stricter assertion. For me, `dragOver` is never called. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1345647800 From aivanov at openjdk.org Wed Oct 4 11:40:33 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 11:40:33 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Tue, 3 Oct 2023 22:49:17 GMT, Damon Nguyen wrote: >> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 88: >> >>> 86: >>> 87: try { >>> 88: Robot robot = new Robot(); >> >> To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. > > Sure can do. Is this to replace the initial `waitForIdle` after robot's creation? So, remove the `waitForIdle` and add `latch.await()` before robot's creation? I'm not sure it's the right idea. If a paint occurred, it means the frame should be displayed on the screen. Yet it does not account for window animations. Perhaps, it does not make sense to introduce more complications which could be not as reliable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1345652111 From aivanov at openjdk.org Wed Oct 4 11:45:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Oct 2023 11:45:39 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Tue, 3 Oct 2023 22:36:15 GMT, Damon Nguyen wrote: >> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 91: >> >>> 89: robot.setAutoWaitForIdle(true); >>> 90: robot.waitForIdle(); >>> 91: robot.delay(DELAY_TIME); >> >> To reduce the initial delay, you may override `Frame.paint` and `countDown` a latch after calling `super.paint`. Once the latch is released, you create robot and start testing. >> >> `DELAY_TIME` could be set to `500` or even less. > > I reduced the `DELAY_TIME` to 500. Thanks for the suggestion. I got used to setting the default delay times to 1000 for these types of tests, and am trying to break the habit and reduce delays further to 500 where possible. Well, I meant that you could reduce the delay if you add the latch. However, 500ms should be enough now. Windows Vista and Windows 7 had long window animations when a window was shown on the screen, I believe this is where the delay of 1 second comes from. Windows 10 and 11 still have this animation but it's quicker. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1345658202 From avu at openjdk.org Wed Oct 4 13:53:35 2023 From: avu at openjdk.org (Alexey Ushakov) Date: Wed, 4 Oct 2023 13:53:35 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: <-7QsruHSzc94aiMNgusI62PatovgdTC3Z6i9WGwguEQ=.8a928627-1307-4cdb-bba6-ff40e8a7ad65@github.com> References: <-7QsruHSzc94aiMNgusI62PatovgdTC3Z6i9WGwguEQ=.8a928627-1307-4cdb-bba6-ff40e8a7ad65@github.com> Message-ID: <1Ir8gjWO341_XlFrqtIGW0WXf12h5-d-DglxFt0iSZg=.b90dde96-73ad-45a9-b647-833ef9aab565@github.com> On Sat, 30 Sep 2023 02:54:56 GMT, Sergey Bylokhov wrote: >> Arik Hadas has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> 8314498: [macos] Transferring File objects to Finder fails >> >> Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). >> This fix was also cherry-picked to muCommander and was verified on macOS >> 12.6.8 and macOs 13, on X86_64 and on M1. > > I think someone from the JetBrains should bring this patch for discussion and confirm who is the "author" of the code. We cannot accept the copied code from the 3p codebase. > @avu please take a look @mrserb thanks for the catch! I'll contact with Andrey and we decide who will submit the PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1746921294 From psadhukhan at openjdk.org Wed Oct 4 14:01:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 4 Oct 2023 14:01:40 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Wed, 4 Oct 2023 11:01:09 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> jcheck > > test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 1: > >> 1: /* > > I looked at the test code more thoroughly. I guess it can be improved. > > Since GitHub doesn't allow adding comments to lines which weren't modified, I'll add my comment here. > > **The first case** is straightforward: > > 1. Click the menu on the menu bar to open it, > 2. Click the greyed out menu item. > > The test saves the location of menu into `point`, then replaces it with location of the menu item. Yet it does request the same positions later in the test where it saves them into `menuLocation` and `itemLocation` correspondingly. Why not do it right away? The positions shouldn't change. Anyway the test relies on this fact because it saves the positions before the menu gets hidden. > > **The second case** tests mouse drag. It simulates clicking the menu to open its popup and then dragging the mouse to the menu item and then releasing the mouse button. > > Here it's more confusing? If you save the values in the first case above, you can clean up the code. > > Then closing the menu could be done *before* entering the block of code for dragging mouse. In my opinion, it will make the test code clearer. I guess menu is closed before mouse is dragged, no? The sequence as I see is 1. Move mouse to center of menu 2. Press to open the menu 3. Move mouse to center of menuitem which is greyed 4. Press mouse button 5. Check if menuItem is closed, if it is fail the test 6. Now 2nd part of the test, Move mouse to center of menu 7. Press mouse to close the menu which was open during 1st part of the test 8. Press mouse to open the menu and Drag mouse from center of menu to center of menuitem and release the mouse 9. Check if menuitem is closed, if it is fail the test So, I think pt 7 "close menu" is happening before pt 8 "drag mouse"....Yes, "point" is being reused but I guess it's ok ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1345847336 From honkar at openjdk.org Wed Oct 4 16:57:11 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 4 Oct 2023 16:57:11 GMT Subject: RFR: 8316146: Open some swing tests 4 [v10] In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 21:57:42 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed jtreg header Updated changes look good. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1658085065 From honkar at openjdk.org Wed Oct 4 17:26:48 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 4 Oct 2023 17:26:48 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly In-Reply-To: References: Message-ID: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> On Thu, 28 Sep 2023 11:18:16 GMT, Ravi Gupta wrote: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Is there source code fix or PR associated with this test. Since the PR description mentions "MouseEntered/Exited" events does not occur properly. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 46: > 44: private static Frame frame; > 45: private volatile static TextArea textArea; > 46: private volatile static List list; Since TextArea and List are accessed only within invokeAndWait they need not be volatile. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 55: > 53: > 54: private static MouseListener mListener = new MouseListener() { > 55: public void mouseClicked(MouseEvent e) { MouseAdapter can be used since only mouseEntered() & mouseExited() are being overridden. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 66: > 64: public void mouseEntered(MouseEvent e) { > 65: System.out > 66: .println("MouseEntered " + e.getSource().getClass().getName()); It is a bit odd to have a line break after sys.out. It looks better this way. System.out.println("MouseEntered " + e.getSource().getClass().getName()); test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 76: > 74: public void mouseExited(MouseEvent e) { > 75: System.out > 76: .println("MouseExited " + e.getSource().getClass().getName()); Same here. Line break. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 95: > 93: frame.add(list); > 94: > 95: textArea = new TextArea("TextArea"); Rows and columns can be specified for the TextArea to reduce scan time. Suggestion: textArea = new TextArea("TextArea", 10, 10); test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 134: > 132: if (frame != null) { > 133: frame.dispose(); > 134: frame = null; After frame.dispose() assigning the var back to null is unnecessary. ------------- Changes requested by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1658089956 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346215327 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346187770 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346196406 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346197393 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346213448 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1346199402 From dnguyen at openjdk.org Wed Oct 4 17:35:10 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 4 Oct 2023 17:35:10 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Wed, 4 Oct 2023 11:38:01 GMT, Alexey Ivanov wrote: >> Sure can do. Is this to replace the initial `waitForIdle` after robot's creation? So, remove the `waitForIdle` and add `latch.await()` before robot's creation? > > I'm not sure it's the right idea. If a paint occurred, it means the frame should be displayed on the screen. Yet it does not account for window animations. Perhaps, it does not make sense to introduce more complications which could be not as reliable. Sure, I agree with this. I'll leave latch & the overridden paint out for now then. >> I reduced the `DELAY_TIME` to 500. Thanks for the suggestion. I got used to setting the default delay times to 1000 for these types of tests, and am trying to break the habit and reduce delays further to 500 where possible. > > Well, I meant that you could reduce the delay if you add the latch. > > However, 500ms should be enough now. Windows Vista and Windows 7 had long window animations when a window was shown on the screen, I believe this is where the delay of 1 second comes from. Windows 10 and 11 still have this animation but it's quicker. Gotcha, I'll leave it as is then. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1346233339 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1346233648 From dnguyen at openjdk.org Wed Oct 4 17:45:25 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 4 Oct 2023 17:45:25 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v5] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Move condition to loop parameters ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/9bb16957..ddb8dc62 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=03-04 Stats: 6 lines in 1 file changed: 1 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From dnguyen at openjdk.org Wed Oct 4 17:45:30 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 4 Oct 2023 17:45:30 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v4] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 11:34:13 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove unnecessary delay. Modify delay amount. Add break. > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 107: > >> 105: System.err.println("Incorrect action during loop"); >> 106: break; >> 107: } > > Actually, I meant adding it as part of the condition in the for-loop itself. However, it works either way. > > The initial bug report for [JDK-4774532](https://bugs.openjdk.org/browse/JDK-4774532) says `dragOver` shouldn't be called at all. Do we want to update the test for a stricter assertion. For me, `dragOver` is never called. It does look cleaner as a part of the for-loop itself, so I moved it in. For updating the test with a stricter assertion, maybe it's better to leave this as is for now since it doesn't necessarily hurt the test from what I can tell. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1346241701 From achung at openjdk.org Wed Oct 4 19:41:32 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 4 Oct 2023 19:41:32 GMT Subject: Integrated: 8316146: Open some swing tests 4 In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 22:00:27 GMT, Alisen Chung wrote: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java This pull request has now been integrated. Changeset: 3105538d Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/3105538de5569845547b40f243a994a95a84b48f Stats: 311 lines in 4 files changed: 311 ins; 0 del; 0 mod 8316146: Open some swing tests 4 Reviewed-by: honkar, aivanov, prr ------------- PR: https://git.openjdk.org/jdk/pull/15875 From duke at openjdk.org Thu Oct 5 08:13:53 2023 From: duke at openjdk.org (Ravi Gupta) Date: Thu, 5 Oct 2023 08:13:53 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: References: Message-ID: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: 8316947: Review comments solved ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15961/files - new: https://git.openjdk.org/jdk/pull/15961/files/3a622f77..a9518ac5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=00-01 Stats: 19 lines in 1 file changed: 1 ins; 10 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15961.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15961/head:pull/15961 PR: https://git.openjdk.org/jdk/pull/15961 From aivanov at openjdk.org Thu Oct 5 10:06:18 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 10:06:18 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v5] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 17:45:25 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Move condition to loop parameters Changes requested by aivanov (Reviewer). test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 101: > 99: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); > 100: for (Point p = new Point(startPoint); > 101: !p.equals(endPoint) || incorrectActionDetected; Suggestion: !p.equals(endPoint) && !incorrectActionDetected; You keep iterating while both conditions are true. As soon as either is false, exit the loop. ------------- PR Review: https://git.openjdk.org/jdk/pull/16018#pullrequestreview-1659420937 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347152843 From aivanov at openjdk.org Thu Oct 5 10:21:26 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 10:21:26 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v10] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:37:10 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > File permission updated Changes requested by aivanov (Reviewer). src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 183: > 181: INT32 cacheIndex; > 182: > 183: if (!DS_lockCache() || FAILED(::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE))) { This code doesn't handle the case where `CoInitializeEx` returns `RPC_E_CHANGED_MODE`. As [discussed previously](https://github.com/openjdk/jdk/pull/14898#discussion_r1327639556), we can proceed in this case too, but we must not call `CoUninitialize`. It also need to be handled in the similar code below. ------------- PR Review: https://git.openjdk.org/jdk/pull/14898#pullrequestreview-1659463318 PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1347179257 From aivanov at openjdk.org Thu Oct 5 12:12:28 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 12:12:28 GMT Subject: RFR: 8303904: Transparent Windows Paint Wrong (Opaque) w/o Volatile Buffering [v2] In-Reply-To: References: <0tixl2g0Tq-yGHz6_0XsPjZwYoW_YWjuoMcaFOVR_68=.0ef9b8e4-930e-4136-8426-124d1e0a5053@github.com> Message-ID: On Wed, 7 Jun 2023 17:22:23 GMT, Jeremy wrote: > What is the fate of auto-closed PRs? @mickleness You can reopen the PR with the [`/open`](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/open) command. > That is: as long as I don't delete this branch in my repo will this be available for future reference if anyone dusts off this ticket in the future? If you keep the branch in your repo, you or anyone could use it as the base to continue working on this issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13196#issuecomment-1748756928 From alexey.ivanov at oracle.com Thu Oct 5 12:15:32 2023 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Thu, 5 Oct 2023 13:15:32 +0100 Subject: RFC: 8309726: Reader::readString In-Reply-To: <000001d99b8f$b6e1a4d0$24a4ee70$@eu> References: <000001d99b8f$b6e1a4d0$24a4ee70$@eu> Message-ID: Hi Markus, You posted it to the wrong list, it belongs on core-libs-dev. -- Regards, Alexey On 10/06/2023 12:35, Markus Karg wrote: > > By analyzing several existing applications I noticed that many of them > need to read a String from an input source (be it an input stream or a > reader), and there are a lot of solutions applied which all are more > or less suboptimal: > > * Files.readString(Path) - Fast, convenient, uses JLA.newStringNoRepl, > only works with files (not with sockets or other sources). > * new String(inputStream.readAllBytes()) - Fast, complex, enforces > dealing with an array in user code, cannot use JLA.newStringNoRepl. > * bufferedReader.lines().collect(StringBuilder::new, > StringBuilder::append, StringBuilder::append).toString(); - Complex, > enforces dealing with a stream in user code, doesn't use > JLA.newStringNoRepl. > * reader.transferTo(stringWriter); stringWriter.toString(); - Medium > convient, medium performance, synchronized as it relies on > StringBuffer instead of StringBuilder. > * Custom loop using char[] of various default sizes (some 8k, some > 16k, some configurable) - Slow, complex, doesn't use JLA.newStringNoRepl. > * etc. > > Checking back with the particular authors of these applications I > noticed that what they all miss is (a) guidance which solution is > "best" (mostly thinking in speed, but also in reduced GC stress and > memory consumption), (b) something convenient like Files.readString() > but working with any reader implementation, not just with files. > > I think we can do better, hence I'd like to propose the introduction > of a new Reader::readString method. The benefits are: > * Guidance. The introduction of this method is a clear signal to all > application programmers to use *this* one by default. > * Convenience. It couldn't be any easier for the caller. > * Performance. OpenJDK committers can optimize it for both, > convenience, speed, reduced GC stress, and memory consumption, at the > very same time. > * Optimizable. Each Reader implementation can choose an algorithm > fitting best its own needs, while java.io.Reader itself provides a > convenient default implementation based on a loop over this.read(). > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexey.ivanov at oracle.com Thu Oct 5 12:55:43 2023 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Thu, 5 Oct 2023 13:55:43 +0100 Subject: JDK-6196792 Image.getScaledInstance In-Reply-To: References: Message-ID: <95353908-9afb-be29-9e45-39c1ce1e30e4@oracle.com> Hi Jeremy, I looked through the comments in the bug and your wiki. If Image.getScaledInstance() is not recommended, we may want to do something about it: as the bug report suggests, either deprecate the method and provide guidelines for the recommended way or fix the implementation. Yet I don't have extensive experience in Java 2D. You can add this a the comment in JBS and ask for Phil's opinion. Regards, Alexey On 23/06/2023 07:06, Jeremy Wood wrote: > The performance of Image.getScaledInstance() has been known to be a > problem for a long time. (This ticket > ?discusses it well. It > has a complicated history.) > > I have developed code > that is much > more performant. It takes less than 10% of the time the > AreaAveragingScaleFilter does. There?s nothing especially clever about > it; it just iterates over the pixels more efficiently. Like > AreaAveragingScaleFilter:?it doesn?t suffer degraded appearance > (pixelation) at less than 50% scale. > > Is there any interest in me working on a PR to overhaul > AreaAveragingScaleFilter? (That is: is there interest in > reviewing/sponsoring such a PR?) It won?t be a trivial task, but the > results I have now indicate the performance gains could be significant. > > (Or in my wildest of pipe dreams: I?d love it if > Graphics2D.drawImage(..) could scale images past 50% without looking > pixelated? but that could be an even more difficult discussion about > RenderingHints and long-established interpolation norms. So I assume > that?s a non-starter.) > > Regards, > ?- Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivanov at openjdk.org Thu Oct 5 14:24:48 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 14:24:48 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v10] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:37:10 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > File permission updated To clarify the situation and to eliminate any misunderstanding, there are three possible cases: 1. COM is not initialised. `CoInitializeEx(COINIT_MULTITHREADED)` returns `S_OK`. This is the ideal situation. 2. The app has already initialised COM on the thread with `CoInitializeEx(COINIT_MULTITHREADED)`. Thus, the second call to `CoInitializeEx` will return `S_FALSE`. This case is also fine. 3. The app has already initialised COM on the thread with `CoInitializeEx(COINIT_APARTMENTTHREADED)`. Thus, the second call inside Java to `CoInitializeEx(COINIT_MULTITHREADED)` will return `RPC_E_CHANGED_MODE` because the concurrency model is changed. Yet this case is fine as well. In all the three cases, it is safe to proceed to call `DirectSoundEnumerate*` because the prerequisite?COM is initialised?is satisfied and because DirectSound APIs support both MTA and STA. In the first two cases, we *must call* `CoUninitialize` when finished; in the third case, we *must **not** call* `CoUninitialize`. If `CoInitializeEx` returns any other error, we must bail out. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1748967705 From aivanov at openjdk.org Thu Oct 5 14:55:35 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 14:55:35 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Wed, 4 Oct 2023 13:58:59 GMT, Prasanta Sadhukhan wrote: > So, I think pt 7 "close menu" is happening before pt 8 "drag mouse"....Yes, "point" is being reused but I guess it's ok It is okay, yet I think it would be clearer and cleaner if the flow was like this: 1. Complete the first case, steps 1?5 above; 2. Click the menu to close it; 3. Drag the mouse. The comment in the code says, ?Drag the mouse?? but before it does so, it once retrieves the coordinates once again, then closes the menu and only now it starts dragging the mouse. If you store the coordinates to `menuLocation` and `itemLocation` when performing the first test, the code becomes cleaner: one clearly sees the coordinates are re-used. (They're re-used either way but retrieved twice.) Then the sequence of the operations will become clearer too: first case (open menu, click greyed out item); close the menu; now start the second case (click the centre of the menu, which opens the menu again, drag the mouse to the greyed out item, release mouse). Both @prrace and I interpreted closing the menu as an unexpected thing but it is intentional, the test needs to close the menu before it can verify the second case. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347554324 From alexey.ivanov at oracle.com Thu Oct 5 15:16:25 2023 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Thu, 5 Oct 2023 16:16:25 +0100 Subject: Misleading message when using Image I/O for write operations In-Reply-To: <87caf995-97f8-d816-821a-66a2d79fc237@geomatys.com> References: <87caf995-97f8-d816-821a-66a2d79fc237@geomatys.com> Message-ID: <63c5a681-60ac-1aa0-1df4-c8f9be6716d4@oracle.com> Hi Martin, It is reasonable to assume creating an output stream may also throw |IOException|. The code handles this situation but it doesn't re-throw the exception because its contract states it returns null in this case. The third option looks as the best solution. Any usages of the API are still expected to handle |IOException|. At the same time, there could be reasons why it's not the best choice. I didn't look thoroughly into the code. Regards, Alexey On 13/09/2022 10:53, Martin Desruisseaux wrote: > > Hello all > > The ImageIO class contains the following method (copying only relevant > parts). The key point to notice is that any IOException is assumed to > be a problem with the cache file, never with the main output stream: > > > /** > * ?snip? > * @return an {@code ImageOutputStream}, or {@code null}. > * ?snip? > * @exception IOException if a cache file is needed but cannot be created. > */ > public static ImageOutputStream createImageOutputStream(Object output) throws IOException { > // ?snip? > try { > return spi.createOutputStreamInstance(output, > usecache, > getCacheDirectory()); > } catch (IOException e) { > throw new IIOException("Can't create cache file!", e); > } > // ?snip? > return null; > } > > > In the particular case where the output is a java.io.File, the SPI > implementation is as below (augmented with a copy of the Javadoc from > public API). Note that the javadoc does not mention that > ImageOutputStreamSpi.createOutputStreamInstance(?) may return null. > > > /** > * ?snip? > * @return an {@code ImageOutputStream} instance. > * ?snip? > * @exception IOException if a cache file is needed but cannot be created. > */ > public ImageOutputStream createOutputStreamInstance(?snip?) throws IOException { > // ?snip? > try { > return new FileImageOutputStream((File)output); > } catch (Exception e) { > e.printStackTrace(); > return null; > } > // ?snip? > } > > > In case of failure to create the output stream, ImageIO.write(?) > throws an exception with the "Can't create an ImageOutputStream!" > message, but we don't know why. The cause (for example no space left > on device) is hidden in the System.err outputs. If we replace the > com.sun.imageio.spi.FileImageOutputStreamSpi implementation by our own > provider propagating the IOException instead of returning null, it is > slightly better but the exception is caught by > ImageIO.createImageOutputStream and rethrown with the misleading > "Can't create cache file!" message. The consequence is that when > writing millions of images (e.g. Earth Observation data) and the > process fails somewhere at ImageOutputStream creation time, it is > currently difficult to identify the cause. > > Possible actions for improving the situation could be (from less > disruptive to most disruptive): > > * Replace the e.printStackTrace() call by the use of logger. > * Remove the try ? catch block in > ImageIO.createImageOutputStream(?), so if an SPI choose to throw > IOException (at the cost of violating current Image I/O contract), > ImageIO does not misleadingly said that it is a problem with the > cache. > * Modify ImageIO.createImageOutputStream(?) contract by saying that > IOException may be thrown because of failure to create the main > output stream, not only because of failure to create the cache > file. Adapt FileImageOutputStreamSpi implementation accordingly. > > Is there any thought about what would be reasonable, what would be too > much disruption? > > ??? Regards, > > ??? ??? Martin > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivanov at openjdk.org Thu Oct 5 15:20:09 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 15:20:09 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: <9v7pBK2yYavXPJPLlk5WhmyvgQzH1jsLHtH-6nb-K_c=.8371f471-a627-4450-96c3-c2a586da0ba6@github.com> On Tue, 3 Oct 2023 00:17:32 GMT, Harshitha Onkar wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Add setAutoWaitForIdle > > LGTM Yesterday after talking to Harshitha @honkar-jdk, I also learned, there's an open bug [JDK-8316016](https://bugs.openjdk.org/browse/JDK-8316016): _getLocationOnScreen API returns incorrect values on macOS 14_. If we suspect `getLocationOnScreen` returns incorrect coordinates, the delays won't fix the problem. However, the delays may help to alleviate the `getLocationOnScreen` bug so that it returns the correct coordinates. But the root cause is misbehaving `getLocationOnScreen` rather than this test itself. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15677#issuecomment-1749076115 From psadhukhan at openjdk.org Thu Oct 5 15:20:17 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 5 Oct 2023 15:20:17 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Thu, 5 Oct 2023 14:51:47 GMT, Alexey Ivanov wrote: >> I guess menu is closed before mouse is dragged, no? >> >> The sequence as I see is >> 1. Move mouse to center of menu >> 2. Press to open the menu >> 3. Move mouse to center of menuitem which is greyed >> 4. Press mouse button >> 5. Check if menuItem is closed, if it is fail the test >> 6. Now 2nd part of the test, Move mouse to center of menu >> 7. Press mouse to close the menu which was open during 1st part of the test >> 8. Press mouse to open the menu and Drag mouse from center of menu to center of menuitem and release the mouse >> 9. Check if menuitem is closed, if it is fail the test >> >> So, I think pt 7 "close menu" is happening before pt 8 "drag mouse"....Yes, "point" is being reused but I guess it's ok > >> So, I think pt 7 "close menu" is happening before pt 8 "drag mouse"....Yes, "point" is being reused but I guess it's ok > > It is okay, yet I think it would be clearer and cleaner if the flow was like this: > > 1. Complete the first case, steps 1?5 above; > 2. Click the menu to close it; > 3. Drag the mouse. > > The comment in the code says, ?Drag the mouse?? but before it does so, it once retrieves the coordinates once again, then closes the menu and only now it starts dragging the mouse. > > If you store the coordinates to `menuLocation` and `itemLocation` when performing the first test, the code becomes cleaner: one clearly sees the coordinates are re-used. (They're re-used either way but retrieved twice.) Then the sequence of the operations will become clearer too: first case (open menu, click greyed out item); close the menu; now start the second case (click the centre of the menu, which opens the menu again, drag the mouse to the greyed out item, release mouse). > > Both @prrace and I interpreted closing the menu as an unexpected thing but it is intentional, the test needs to close the menu before it can verify the second case. But 1st case uses center coordinates via Util.getCenterPoint whereas 2nd case uses getLocationOnScreen+10 so it's not exactly the same. I guess we can do away with Util class and make it use SwingUtilities.invokeAndWait but I guess we can do it at later point.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347591167 From aivanov at openjdk.org Thu Oct 5 15:20:26 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 15:20:26 GMT Subject: Integrated: 8313348: Fix typo in JFormattedTextField: 'it self' In-Reply-To: References: Message-ID: On Mon, 31 Jul 2023 10:14:45 GMT, Alexey Ivanov wrote: > A trivial change: ?it self? ? ?itself?. > > In addition to it, I added a comma after ?Similarly? where it starts a sentence. This pull request has now been integrated. Changeset: a1c9587c Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/a1c9587c27538bda3b0f6745d9c80ff4e1b9a77e Stats: 79 lines in 2 files changed: 61 ins; 2 del; 16 mod 8313348: Fix typo in JFormattedTextField: 'it self' Reviewed-by: honkar, dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15087 From aivanov at openjdk.org Thu Oct 5 15:27:10 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 15:27:10 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Thu, 5 Oct 2023 15:15:24 GMT, Prasanta Sadhukhan wrote: > But 1st case uses center coordinates via Util.getCenterPoint whereas 2nd case uses getLocationOnScreen+10 so it's not exactly the same. Yes, they're somewhat different. Yet the centre is safer (what if `getLocationOnScreen+10` is out of menu bounds?), it doesn't change the test logic. > I guess we can do away with Util class and make it use SwingUtilities.invokeAndWait but I guess we can do it at later point.. It's possible? yet I don't see much value in doing so, the `Util` class does it job? and avoids duplicating code. However, `glide` method doesn't provide a smooth glide: with its 10-pixel step, the mouse is moved from the "Menu" to the greyed out item in just two steps. It's still a drag yet I expected smoother movement. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347606918 From psadhukhan at openjdk.org Thu Oct 5 15:32:29 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 5 Oct 2023 15:32:29 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Thu, 5 Oct 2023 15:23:57 GMT, Alexey Ivanov wrote: > Yes, they're somewhat different If you concede they are different, then what change you want me to do? If you say center is safer and then still use menuLocation coordinate which is obtained via getLocationScreen, it's confusing.. I think it's good as it is... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347614433 From dnguyen at openjdk.org Thu Oct 5 15:49:35 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 5 Oct 2023 15:49:35 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v6] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Change or to and ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/ddb8dc62..9c385567 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From dnguyen at openjdk.org Thu Oct 5 15:50:40 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 5 Oct 2023 15:50:40 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: On Tue, 3 Oct 2023 22:33:16 GMT, Damon Nguyen wrote: >> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 1: >> >>> 1: /* >> >> I've got questions whether all the AWT resources are released. >> >> When the test fails with timeout, the screen shot does not have the frame, it displays an empty desktop. >> >> The stack trace for the main thread: >> >> >> java.base/java.lang.Object.wait0(Native Method) >> java.base/java.lang.Object.wait(Object.java:375) >> java.base/java.lang.Thread.join(Thread.java:2045) >> java.base/java.lang.Thread.join(Thread.java:2121) >> java.base/java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:114) >> java.base/java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:47) >> java.base/java.lang.Shutdown.runHooks(Shutdown.java:130) >> java.base/java.lang.Shutdown.exit(Shutdown.java:167) >> java.base/java.lang.Runtime.exit(Runtime.java:188) >> java.base/java.lang.System.exit(System.java:1920) >> com.sun.javatest.regtest.agent.AStatus.exit(AStatus.java:198) >> com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:95)" >> >> >> That is the main method of the test class terminated. Yet JVM does not exit for whatever reason. >> >> At the same time, the thread dump contains both `AWT-Windows` and `AWT-EventQueue-0` threads, which means AWT prevents the JVM from exiting. Why? I have no clue. >> >> Will removing the mouse listeners from the frame let it be disposed of? >> >> if (frame != null) { >> frame.removeMouseListener((MouseListener) dgr); >> frame.removeMouseMotionListener((MouseMotionListener) dgr); >> frame.dispose(); >> } >> >> >> Although the changes that you've made make the test faster, it may still time out unless we find the root cause. > > Interesting, let me look into this quickly. Didn't notice this. I can't seem to tell whether or not the JVM exits at the end of the test when the frame is disposed. Does removing the listeners work for you? And where are you checking the stack trace? I can't reproduce this on my machine ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347640465 From aivanov at openjdk.org Thu Oct 5 16:01:24 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 16:01:24 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v4] In-Reply-To: References: <_4V1TB-_CJD6DHs7I6AvZlY6-rmvV9cZ0BD9YSzc4Js=.cdb44d33-fe0a-404e-ad52-f25546fbf09f@github.com> Message-ID: On Thu, 5 Oct 2023 15:29:15 GMT, Prasanta Sadhukhan wrote: > If you concede they are different, then what change you want me to do? If you say center is safer and then still use menuLocation coordinate which is obtained via getLocationScreen, it's confusing.. I see no big difference in dragging mouse from the centre to the centre compared to +10 offset. This is what I mean: https://github.com/aivanov-jdk/jdk/commit/da8213be220287ec4b9f7921fcd3ae4b4ece802d > I think it's good as it is... I think it can be simplified. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347655722 From aivanov at openjdk.org Thu Oct 5 16:05:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 5 Oct 2023 16:05:42 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> Message-ID: <_gAnX4o727a3n3xlrV2AJNmdzn2J1SpNXkqe_YjYuvI=.414b463d-38f4-488c-8572-8b2e99257481@github.com> On Thu, 5 Oct 2023 15:48:03 GMT, Damon Nguyen wrote: > I can't reproduce this on my machine Me neither. > Does removing the listeners work for you? I haven't run the test in the CI with listeners removed; I haven't tested it in any way at all. I'm just looking for explanation why the JVM doesn't exit. > And where are you checking the stack trace? I checked the CI logs. I'll explain privately. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347661921 From dnguyen at openjdk.org Thu Oct 5 16:13:34 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 5 Oct 2023 16:13:34 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v7] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add not operator ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/9c385567..3daf5d14 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=05-06 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From angorya at openjdk.org Thu Oct 5 16:15:37 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 5 Oct 2023 16:15:37 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:47:39 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Fix is updated to register listener before component is added/removed. > > @andy-goryachev-oracle @aghaisas Can you please review this FX fix? > > There is some SwingNode rendering issue still due to [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) but size update issue should be fixed.. @prsadhuk Pre-submit tests - windows-x64 / build - Build / test Failing after 75m ? 1/2 failed ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749243830 From dnguyen at openjdk.org Thu Oct 5 16:20:08 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 5 Oct 2023 16:20:08 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v8] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove excess ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/3daf5d14..f5a4f28f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=06-07 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From psadhukhan at openjdk.org Thu Oct 5 16:23:27 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 5 Oct 2023 16:23:27 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:47:39 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Fix is updated to register listener before component is added/removed. > > @andy-goryachev-oracle @aghaisas Can you please review this FX fix? > > There is some SwingNode rendering issue still due to [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) but size update issue should be fixed.. > @prsadhuk Pre-submit tests - windows-x64 / build - Build / test Failing after 75m ? 1/2 failed Not sure on this..The failure says which has nothing to do with the change.. Output from failing command(s) repeated here === * For target jdk_modules_java.management.rmi__the.java.management.rmi_batch: IOException caught during compilation: Connection reset ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749254612 From djelinski at openjdk.org Thu Oct 5 16:29:26 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 5 Oct 2023 16:29:26 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: > Please review this patch that removes a number of unused exports from java.desktop native libraries. > > In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: > - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. > - removed `colorValueID` in X11Color; that field was not used. > - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. > > The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. > > The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. > > Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: - Merge remote-tracking branch 'origin' into desktop-exports - Merge remote-tracking branch 'origin' into desktop-exports - Make J2dTraceInit static - Remove unnecessary exports ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13261/files - new: https://git.openjdk.org/jdk/pull/13261/files/02b46a5c..beb0add8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=01-02 Stats: 550814 lines in 9410 files changed: 317608 ins; 143975 del; 89231 mod Patch: https://git.openjdk.org/jdk/pull/13261.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13261/head:pull/13261 PR: https://git.openjdk.org/jdk/pull/13261 From psadhukhan at openjdk.org Thu Oct 5 16:49:55 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 5 Oct 2023 16:49:55 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI Message-ID: A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog Fix is to make sure the option pane dialog is always on top.... ------------- Commit messages: - JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI Changes: https://git.openjdk.org/jdk/pull/16060/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16060&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6690019 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16060/head:pull/16060 PR: https://git.openjdk.org/jdk/pull/16060 From angorya at openjdk.org Thu Oct 5 17:41:16 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 5 Oct 2023 17:41:16 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:48:59 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Register listener before component add could you restart the failing build? Let's make sure it's a transient build issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749369687 From dnguyen at openjdk.org Thu Oct 5 17:45:58 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 5 Oct 2023 17:45:58 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: <_gAnX4o727a3n3xlrV2AJNmdzn2J1SpNXkqe_YjYuvI=.414b463d-38f4-488c-8572-8b2e99257481@github.com> References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> <_gAnX4o727a3n3xlrV2AJNmdzn2J1SpNXkqe_YjYuvI=.414b463d-38f4-488c-8572-8b2e99257481@github.com> Message-ID: <7NW3Y0GdVmLy4KuPA2_W71G8b6SFOXLnl3oOuobzKl8=.1fd477de-b04c-4c3d-b491-564d0da43b3f@github.com> On Thu, 5 Oct 2023 16:03:18 GMT, Alexey Ivanov wrote: >> I can't seem to tell whether or not the JVM exits at the end of the test when the frame is disposed. Does removing the listeners work for you? And where are you checking the stack trace? I can't reproduce this on my machine > >> I can't reproduce this on my machine > > Me neither. > >> Does removing the listeners work for you? > > I haven't run the test in the CI with listeners removed; I haven't tested it in any way at all. I'm just looking for explanation why the JVM doesn't exit. > >> And where are you checking the stack trace? > > I checked the CI logs. I'll explain privately. I tried running the test at nearly its original state (I only added the `setSize` and `setLocationRelativeTo`) and got a failure. Looking at the stack, its the same as you mentioned. I tried re-running the test with the removal of the mouseListeners as suggested, and for the first 100 repeats, it passes. But, I ran another 100 and got a failure. Looking at the stack again, it looks identical to the failure before. Looking at the test, I'm not too sure what can be causing this. The only things that seem suspicious are the drag listeners as you mentioned. However, since the accumulation of the changes doesn't seem to cause any failures anymore, should I just follow through with this PR? I can raise another bug if needed for this intermittent failure. Can't identify what's causing this though.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347777824 From angorya at openjdk.org Thu Oct 5 19:12:03 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 5 Oct 2023 19:12:03 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:48:59 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Register listener before component add While running the SCCE in the ticket with the jdk compiled with the fix from pull/15960 on macOS 13.5.2 M1, noticed two things: 1. the very first time it works as expected. There is a bit of flicker when the button gets replaced, perhaps it's due to runLater and invokeLater and debug output to stdout. 2. subsequent runs exhibit a strange behavior where the button is not positioned at the center. Sometimes it's at the corner, and one time it was nowhere to be seen (the whole window was red). Example: Screenshot 2023-10-05 at 11 59 14 3. when clicking the button to make the size exceed the window size, I've got OOME. Perhaps it's expected: Button size: java.awt.Dimension[width=3296,height=928] SwingNode size: 3296.0 928.0 Button size: java.awt.Dimension[width=6592,height=1856] SwingNode size: 6592.0 1856.0 Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.image.DataBufferInt.(DataBufferInt.java:76) at java.desktop/java.awt.image.Raster.createPackedRaster(Raster.java:538) at java.desktop/java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.desktop/java.awt.image.BufferedImage.(BufferedImage.java:351) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.createImage(AquaPainter.java:193) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.lambda$paintFromSingleCachedImage$0(AquaPainter.java:178) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter$$Lambda/0x00000007702d7020.apply(Unknown Source) at java.desktop/sun.awt.image.MultiResolutionCachedImage.getResolutionVariant(MultiResolutionCachedImage.java:84) at java.desktop/sun.java2d.SunGraphics2D.getResolutionVariant(SunGraphics2D.java:3305) at java.desktop/sun.java2d.SunGraphics2D.drawHiDPIImage(SunGraphics2D.java:3133) at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3371) at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3321) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.paintFromSingleCachedImage(AquaPainter.java:186) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.paint(AquaPainter.java:141) at java.desktop/com.apple.laf.AquaPainter.paint(AquaPainter.java:90) at java.desktop/com.apple.laf.AquaButtonBorder.doButtonPaint(AquaButtonBorder.java:104) at java.desktop/com.apple.laf.AquaButtonBorder$Dynamic.doButtonPaint(AquaButtonBorder.java:241) at java.desktop/com.apple.laf.AquaButtonBorder.paintButton(AquaButtonBorder.java:100) at java.desktop/com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:316) at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:852) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1128) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137) at java.desktop/sun.swing.JLightweightFrame$3.paint(JLightweightFrame.java:343) at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5318) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1656) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1631) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1569) at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1336) at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5266) at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5076) Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.image.DataBufferInt.(DataBufferInt.java:76) at java.desktop/java.awt.image.Raster.createPackedRaster(Raster.java:538) at java.desktop/java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.desktop/java.awt.image.BufferedImage.(BufferedImage.java:351) at java.desktop/sun.swing.JLightweightFrame.resizeBuffer(JLightweightFrame.java:458) at java.desktop/sun.swing.JLightweightFrame.reshape(JLightweightFrame.java:443) at java.desktop/java.awt.Component.setBounds(Component.java:2339) at java.desktop/java.awt.Window.setBounds(Window.java:3560) at jdk.unsupported.desktop/jdk.swing.interop.LightweightFrameWrapper.setBounds(LightweightFrameWrapper.java:110) at javafx.swing/com.sun.javafx.embed.swing.newimpl.SwingNodeInteropN.setBounds(SwingNodeInteropN.java:160) at javafx.swing/javafx.embed.swing.SwingNode.lambda$20(SwingNode.java:707) at javafx.swing/javafx.embed.swing.SwingNode$$Lambda/0x0000000770234888.run(Unknown Source) at javafx.swing/com.sun.javafx.embed.swing.SwingNodeHelper.runOnEDT(SwingNodeHelper.java:170) at javafx.swing/javafx.embed.swing.SwingNode.locateLwFrame(SwingNode.java:704) at javafx.swing/javafx.embed.swing.SwingNode.lambda$17(SwingNode.java:486) at javafx.swing/javafx.embed.swing.SwingNode$$Lambda/0x0000000770234ee8.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.executePrivileged(AccessController.java:778) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.image.DataBufferInt.(DataBufferInt.java:76) at java.desktop/java.awt.image.Raster.createPackedRaster(Raster.java:538) at java.desktop/java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.desktop/java.awt.image.BufferedImage.(BufferedImage.java:351) at java.desktop/sun.swing.JLightweightFrame.resizeBuffer(JLightweightFrame.java:458) at java.desktop/sun.swing.JLightweightFrame.reshape(JLightweightFrame.java:443) at java.desktop/java.awt.Component.setBounds(Component.java:2339) at java.desktop/java.awt.Window.setBounds(Window.java:3560) at jdk.unsupported.desktop/jdk.swing.interop.LightweightFrameWrapper.setBounds(LightweightFrameWrapper.java:110) at javafx.swing/com.sun.javafx.embed.swing.newimpl.SwingNodeInteropN.setBounds(SwingNodeInteropN.java:160) at javafx.swing/javafx.embed.swing.SwingNode.lambda$20(SwingNode.java:707) at javafx.swing/javafx.embed.swing.SwingNode$$Lambda/0x0000000770234888.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.executePrivileged(AccessController.java:778) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.image.DataBufferInt.(DataBufferInt.java:76) at java.desktop/java.awt.image.Raster.createPackedRaster(Raster.java:538) at java.desktop/java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.desktop/java.awt.image.BufferedImage.(BufferedImage.java:351) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.createImage(AquaPainter.java:193) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.lambda$paintFromSingleCachedImage$0(AquaPainter.java:178) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter$$Lambda/0x00000007702d7020.apply(Unknown Source) at java.desktop/sun.awt.image.MultiResolutionCachedImage.getResolutionVariant(MultiResolutionCachedImage.java:84) at java.desktop/sun.java2d.SunGraphics2D.getResolutionVariant(SunGraphics2D.java:3305) at java.desktop/sun.java2d.SunGraphics2D.drawHiDPIImage(SunGraphics2D.java:3133) at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3371) at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3321) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.paintFromSingleCachedImage(AquaPainter.java:186) at java.desktop/com.apple.laf.AquaPainter$AquaSingleImagePainter.paint(AquaPainter.java:141) at java.desktop/com.apple.laf.AquaPainter.paint(AquaPainter.java:90) at java.desktop/com.apple.laf.AquaButtonBorder.doButtonPaint(AquaButtonBorder.java:104) at java.desktop/com.apple.laf.AquaButtonBorder$Dynamic.doButtonPaint(AquaButtonBorder.java:241) at java.desktop/com.apple.laf.AquaButtonBorder.paintButton(AquaButtonBorder.java:100) at java.desktop/com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:316) at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:852) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1128) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137) at java.desktop/sun.swing.JLightweightFrame$3.paint(JLightweightFrame.java:343) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961) at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5325) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1656) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1631) Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749491912 From angorya at openjdk.org Thu Oct 5 19:16:02 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 5 Oct 2023 19:16:02 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: <2SWStocASBj7myvsotoKfygiM2l0kQzuRuFdAggIEqk=.e03da1fd-acf3-4ce2-9794-921de4e3e47d@github.com> On Wed, 4 Oct 2023 05:48:59 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Register listener before component add I think OOME is expected. The earlier stack trace was for retina (scale=2), when displaying on a secondary monitor with the scale=1 I am getting OOME later: Button size: java.awt.Dimension[width=13184,height=3712] SwingNode size: 13184.0 3712.0 Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space ~48M * 4 bytes (I assume) = 193Mbytes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749497333 From angorya at openjdk.org Thu Oct 5 19:21:02 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 5 Oct 2023 19:21:02 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:48:59 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Register listener before component add What puzzles me is that I am getting inconsistent results. Run the test, see the button, clicked once - the button disappears. Moved the window to another sceen - the button appears in the corner. Clicked on the button - now I see two buttons (corrupted screen buffer)? Of course, I might be doing something wrong. My command line: /Users/angorya/Projects/jdk/build/macosx-aarch64-client-release/jdk/bin/java -XX:+ShowCodeDetailsInExceptionMessages -ea -Djava.library.path=/Users/angorya/Projects/jfx3/jfx/rt/build/sdk/lib -Dfile.encoding=UTF-8 -p /Users/angorya/Projects/Test3/Test/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.base/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.controls/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.graphics/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.fxml/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.media/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.swing/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.web/bin -classpath /Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-api_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-engine_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-migrationsupport_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins /junit-jupiter-params_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-commons_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-engine_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-launcher_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-runner_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-api_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-engine_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-commons_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-vintage-engine_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.opentest4j_1.2.0.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.apiguardian.api_1.1.2.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.junit_4.13.2.v20211018-1956.jar:/Applications/Eclipse.app/Contents/Ecli pse/plugins/org.hamcrest.core_1.3.0.v20180420-1519.jar --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-exports javafx.graphics/test.com.sun.javafx.pgstub=javafx.controls --add-exports javafx.base/test.com.sun.javafx.binding=javafx.controls --add-exports javafx.base/test.util.memory=javafx.controls --add-exports javafx.base/test.javafx.collections=javafx.controls --add-exports javafx.base/com.sun.javafx.property=javafx.graphics --add-exports javafx.base/test.util.memory=javafx.graphics --add-exports java.base/sun.security.util=javafx.graphics --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-reads javafx.fxml=javafx.controls --add-exports javafx.base/com.sun.javafx.collections=javafx.fxml --add-exports javafx.graphics/test.com.sun.javafx.pgstub=javafx.controls --add-exports javafx.base/test.com.sun.javafx.binding=javafx.controls --add- exports javafx.base/test.util.memory=javafx.controls --add-exports javafx.base/test.javafx.collections=javafx.controls --add-exports javafx.base/com.sun.javafx.property=javafx.graphics --add-exports javafx.base/test.util.memory=javafx.graphics --add-exports java.base/sun.security.util=javafx.graphics --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-exports javafx.base/com.sun.javafx=javafx.web --add-exports javafx.base/test.util.memory=javafx.web --add-reads javafx.web=java.management --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management -m andy_test/goryachev.apps.AppTestLauncher ![Screenshot 2023-10-05 at 12 13 45](https://github.com/openjdk/jdk/assets/107069028/82403999-bd36-428c-ae65-33a078551947) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1749503659 From duke at openjdk.org Fri Oct 6 03:33:29 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 6 Oct 2023 03:33:29 GMT Subject: RFR: JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java Message-ID: Hi Reviewers, I have added screen shot capturing facility to the test case and that will help for debugging in case of failure. Please review and let me know your suggestions or comments if any. Regards, Renjith. ------------- Commit messages: - JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java Changes: https://git.openjdk.org/jdk/pull/16067/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16067&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317112 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16067.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16067/head:pull/16067 PR: https://git.openjdk.org/jdk/pull/16067 From honkar at openjdk.org Fri Oct 6 04:56:01 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 6 Oct 2023 04:56:01 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> References: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> Message-ID: On Wed, 4 Oct 2023 08:32:31 GMT, Prasanta Sadhukhan wrote: >> Can you please tell which system it is not working? >> I guess harshita and vitaly tested on macos14 and it worked for them and I tested on other mac13,windows10 locally where it also worked, as well as in mach5 systems, whose link I have put in JBS. >> >> I also have seen the menu disappear while clicking but it does not cause the test to fail..I saw the video recording vitaly uploaded in JBS and it is same as in macos13 where it pass always (we also dont see any failure for this test in CI runs so far) > > Add a delay to make it work on mach5 mac14 system. Tested for 50 iterations, link in JBS @prsadhuk > These don't help on the system I have tested on. There's something else going on. The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. I don't think it does. If I comment out the press/release the same exception occurs. And visually you can see the menu disappear and then reappear. What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. It only happens once .. very odd .. Ran the updated test MacOS 14 ARM, thought the test passes there seems to be an issue similar to what Phil described earlier - the menu appears then disappears and appears again quickly for the second scenario - when the menu is clicked and glided through the dropdown. I have attached the screen recording to the JBS. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1348241212 From psadhukhan at openjdk.org Fri Oct 6 05:03:07 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Oct 2023 05:03:07 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> Message-ID: On Fri, 6 Oct 2023 04:52:54 GMT, Harshitha Onkar wrote: >> Add a delay to make it work on mach5 mac14 system. Tested for 50 iterations, link in JBS > > @prsadhuk > >> These don't help on the system I have tested on. There's something else going on. The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. I don't think it does. If I comment out the press/release the same exception occurs. And visually you can see the menu disappear and then reappear. What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. It only happens once .. very odd .. > > Ran the updated test MacOS 14 ARM, thought the test passes there seems to be an issue similar to what Phil described earlier - the menu appears then disappears and appears again quickly for the second scenario - when the menu is clicked and glided through the dropdown. I have attached the screen recording to the JBS. OK..But why the frame is at the right hand edge of the screen when we specify setLocationRelativeTo to center it? Probably there is something wrong with setting location too in mac14 arm? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1348244798 From tr at openjdk.org Fri Oct 6 05:18:18 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 6 Oct 2023 05:18:18 GMT Subject: RFR: 4365952: Cannot disable JFileChooser Message-ID: Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. ------------- Commit messages: - Fix + Test Changes: https://git.openjdk.org/jdk/pull/16068/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=00 Issue: https://bugs.openjdk.org/browse/JDK-4365952 Stats: 184 lines in 9 files changed: 182 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From honkar at openjdk.org Fri Oct 6 05:37:01 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 6 Oct 2023 05:37:01 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: <-sM5uaDcwOGnlvL7d8aG2vb6B8Ue-sPJTtAa3c4saTk=.e695ad48-af8a-4b7b-a82f-44181e42adcc@github.com> Message-ID: On Fri, 6 Oct 2023 05:00:12 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk >> >>> These don't help on the system I have tested on. There's something else going on. The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. I don't think it does. If I comment out the press/release the same exception occurs. And visually you can see the menu disappear and then reappear. What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. It only happens once .. very odd .. >> >> Ran the updated test MacOS 14 ARM, thought the test passes there seems to be an issue similar to what Phil described earlier - the menu appears then disappears and appears again quickly for the second scenario - when the menu is clicked and glided through the dropdown. I have attached the screen recording to the JBS. > > OK..But why the frame is at the right hand edge of the screen when we specify setLocationRelativeTo to center it? > Probably there is something wrong with setting location too in mac14 arm? I captured portion of the screen, hence the frame appears on the right edge in the recording. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1348261006 From psadhukhan at openjdk.org Fri Oct 6 05:47:00 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Oct 2023 05:47:00 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v2] In-Reply-To: References: Message-ID: On Wed, 4 Oct 2023 05:48:59 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Register listener before component add > What puzzles me is that I am getting inconsistent results. Run the test, see the button, clicked once - the button disappears. Moved the window to another sceen - the button appears in the corner. Clicked on the button - now I see two buttons (corrupted screen buffer)? > > Of course, I might be doing something wrong. My command line: > > ``` > /Users/angorya/Projects/jdk/build/macosx-aarch64-client-release/jdk/bin/java -XX:+ShowCodeDetailsInExceptionMessages -ea -Djava.library.path=/Users/angorya/Projects/jfx3/jfx/rt/build/sdk/lib -Dfile.encoding=UTF-8 -p /Users/angorya/Projects/Test3/Test/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.base/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.controls/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.graphics/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.fxml/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.media/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.swing/bin:/Users/angorya/Projects/jfx3/jfx/rt/modules/javafx.web/bin -classpath /Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-api_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-engine_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-jupiter-migrationsupport_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugi ns/junit-jupiter-params_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-commons_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-engine_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-launcher_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-runner_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-api_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-engine_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-platform-suite-commons_1.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/junit-vintage-engine_5.9.3.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.opentest4j_1.2.0.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.apiguardian.api_1.1.2.jar:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.junit_4.13.2.v20211018-1956.jar:/Applications/Eclipse.app/Contents/Ec lipse/plugins/org.hamcrest.core_1.3.0.v20180420-1519.jar --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-exports javafx.graphics/test.com.sun.javafx.pgstub=javafx.controls --add-exports javafx.base/test.com.sun.javafx.binding=javafx.controls --add-exports javafx.base/test.util.memory=javafx.controls --add-exports javafx.base/test.javafx.collections=javafx.controls --add-exports javafx.base/com.sun.javafx.property=javafx.graphics --add-exports javafx.base/test.util.memory=javafx.graphics --add-exports java.base/sun.security.util=javafx.graphics --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-reads javafx.fxml=javafx.controls --add-exports javafx.base/com.sun.javafx.collections=javafx.fxml --add-exports javafx.graphics/test.com.sun.javafx.pgstub=javafx.controls --add-exports javafx.base/test.com.sun.javafx.binding=javafx.controls --ad d-exports javafx.base/test.util.memory=javafx.controls --add-exports javafx.base/test.javafx.collections=javafx.controls --add-exports javafx.base/com.sun.javafx.property=javafx.graphics --add-exports javafx.base/test.util.memory=javafx.graphics --add-exports java.base/sun.security.util=javafx.graphics --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management --add-exports javafx.base/com.sun.javafx=javafx.web --add-exports javafx.base/test.util.memory=javafx.web --add-reads javafx.web=java.management --add-reads javafx.base=java.management --add-reads javafx.base=jdk.management -m andy_test/goryachev.apps.AppTestLauncher > ``` > > ![Screenshot 2023-10-05 at 12 13 45](https://user-images.githubusercontent.com/107069028/273016576-82403999-bd36-428c-ae65-33a078551947.png) Button appear at the corner existed before the fix also as I see in this screenshot... (SInce the size was not updated before the fix, the label was truncated but it is moved to the corner as you can see) ![image](https://github.com/openjdk/jdk/assets/43534309/5ea18fa9-2844-421f-ac39-80b8fdf2ea60) disappear and reappear issue seems to be due to [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) SwingNode rendering issue as I mentioned earlier in this PR...so I think we can ignore the unsolved rendering issue for now and see it as size update fix (although it may alleviate rendering issue to the user but maybe one fix at a time) I normally test with this command ./jdk/bin/java @E://ade//javafx//jfx//rt//build//run.args SwingNodeResize where run.args is --module-path="E:/ade/javafx/jfx/rt/build/sdk/lib" --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1750015938 From psadhukhan at openjdk.org Fri Oct 6 06:40:30 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Oct 2023 06:40:30 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v3] In-Reply-To: References: Message-ID: > SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. > > JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` > > so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: dummy commit ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15960/files - new: https://git.openjdk.org/jdk/pull/15960/files/2c40b865..4cbd291a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=01-02 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15960.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15960/head:pull/15960 PR: https://git.openjdk.org/jdk/pull/15960 From duke at openjdk.org Fri Oct 6 06:59:56 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 6 Oct 2023 06:59:56 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v11] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: - Fixed space removed befor line 179 - CoInitializeEx fuction error check updated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/df9f5d70..b9e2d859 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=09-10 Stats: 25 lines in 2 files changed: 21 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From psadhukhan at openjdk.org Fri Oct 6 07:25:54 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 6 Oct 2023 07:25:54 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: > SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. > > JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` > > so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Revalidate component after add ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15960/files - new: https://git.openjdk.org/jdk/pull/15960/files/4cbd291a..13dfe138 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15960&range=02-03 Stats: 4 lines in 1 file changed: 3 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15960.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15960/head:pull/15960 PR: https://git.openjdk.org/jdk/pull/15960 From duke at openjdk.org Fri Oct 6 07:54:20 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 6 Oct 2023 07:54:20 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v12] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Revert "CoInitializeEx fuction error check updated" This reverts commit a3bf3f4cf07c82cad3ccfd9c2e27f24231ef9ffd. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/b9e2d859..c4512410 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=10-11 Stats: 25 lines in 1 file changed: 0 ins; 21 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From duke at openjdk.org Fri Oct 6 11:17:01 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 6 Oct 2023 11:17:01 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v13] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with three additional commits since the last revision: - Whitespace error fixed - Whitespace error fixed - CoInitializeEx error check modified with better condition ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/c4512410..0502dc94 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=12 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=11-12 Stats: 25 lines in 2 files changed: 21 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From aivanov at openjdk.org Fri Oct 6 16:00:01 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 6 Oct 2023 16:00:01 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v13] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 11:17:01 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with three additional commits since the last revision: > > - Whitespace error fixed > - Whitespace error fixed > - CoInitializeEx error check modified with better condition Changes requested by aivanov (Reviewer). src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 188: > 186: > 187: HRESULT hr=::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); > 188: if(hr != S_OK || hr != S_FALSE || hr != RPC_E_CHANGED_MODE) { Suggestion: HRESULT hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); if (FAILED(hr) && hr != RPC_E_CHANGED_MODE) { You said Microsoft recommends using `FAILED` and `SUCCEEDED` macros, so we should use them here too. I think you got the condition wrong. The valid values to continue are if (hr == S_OK || hr == S_FALSE || hr == RPC_E_CHANGED_MODE) { // Good - do the stuff } Here we need to reverse the condition: if (!(hr == S_OK || hr == S_FALSE || hr == RPC_E_CHANGED_MODE)) { // Unlock and return } To negate the condition, you negate all the operators and `OR` becomes `AND`. Thus, the condition becomes: if (hr != S_OK && hr != S_FALSE && hr != RPC_E_CHANGED_MODE)) { // Unlock and return } The first two conditions could be converted to `FAILED(hr)`, which gives us the condition I suggested. src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 234: > 232: } > 233: > 234: if(hr != RPC_E_CHANGED_MODE) { Suggestion: if (hr != RPC_E_CHANGED_MODE) { Space between the `if` keyword and the opening parenthesis. ------------- PR Review: https://git.openjdk.org/jdk/pull/14898#pullrequestreview-1662190325 PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1348907643 PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1348908246 From honkar at openjdk.org Fri Oct 6 17:05:08 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 6 Oct 2023 17:05:08 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> References: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> Message-ID: On Wed, 4 Oct 2023 17:00:42 GMT, Harshitha Onkar wrote: >> Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: >> >> 8316947: Review comments solved > > test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 66: > >> 64: public void mouseEntered(MouseEvent e) { >> 65: System.out >> 66: .println("MouseEntered " + e.getSource().getClass().getName()); > > It is a bit odd to have a line break after sys.out. It looks better this way. > > > System.out.println("MouseEntered " > + e.getSource().getClass().getName()); I would add the line break after "MouseEntered/Exited" as above, looks cleaner and preserves line length. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1348985296 From honkar at openjdk.org Fri Oct 6 17:09:12 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 6 Oct 2023 17:09:12 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 08:13:53 GMT, Ravi Gupta wrote: >> Write a test to check textArea triggers MouseEntered/MouseExited events properly >> >> MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. >> >> In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) >> >> Testing: >> Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. > > Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: > > 8316947: Review comments solved Updated changes look good. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1662330768 From angorya at openjdk.org Fri Oct 6 17:32:08 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Fri, 6 Oct 2023 17:32:08 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: <6TmZyBKbcQ8882nRpazTM1use0pGYTgYXw3N4K0ymRQ=.9bd0c549-7d67-47dd-b21e-2f1d3f357ede@github.com> On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add Pre-submit tests - linux-x64 / test - Test (tier1) Failing after 80m ? 1/10 failed (? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583)) why is that? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1751160840 From prr at openjdk.org Fri Oct 6 17:34:05 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 6 Oct 2023 17:34:05 GMT Subject: RFR: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 10:30:50 GMT, Alexander Zvegintsev wrote: > The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale. > > This changeset includes: > > * sun.java2d.uiScale value is now taken into account > * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system. > Now we take that into account and resize the image accordingly. > * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution. > * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported. > > Following tests are no longer failing on Wayland: > java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java > > Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling). Looks good. I assume performance is unchanged in the case when you can skip the scaling, which I expect is on all non-hidpi displays. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16027#pullrequestreview-1662509426 From angorya at openjdk.org Fri Oct 6 17:40:08 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Fri, 6 Oct 2023 17:40:08 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add With the latest change, it behaves as expected on the primary retina screen. However, something is wrong if I put it on the secondary monitor right after the launch: I am still getting inconsistent behavior, incorrect button location, and visual artifacts. For example, one time there is no button after the first click. The button appears when I resize the window. Another time, the button is in the corner again and some visual artifacts are present (see the screenshots below). Perhaps we need to update the scale somewhere? ![Screenshot 2023-10-06 at 10 28 26](https://github.com/openjdk/jdk/assets/107069028/4c1a6dbf-8e27-477d-8a8f-96ca3eea6cf0) ![Screenshot 2023-10-06 at 10 28 34](https://github.com/openjdk/jdk/assets/107069028/da1f2c4c-f237-462f-b62b-159ac388d716) just in case, my monitor setup: Screenshot 2023-10-06 at 10 35 33 ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1751166496 PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1751172001 From aivanov at openjdk.org Fri Oct 6 18:30:13 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 6 Oct 2023 18:30:13 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 08:13:53 GMT, Ravi Gupta wrote: >> Write a test to check textArea triggers MouseEntered/MouseExited events properly >> >> MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. >> >> In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) >> >> Testing: >> Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. > > Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: > > 8316947: Review comments solved Changes requested by aivanov (Reviewer). test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 40: > 38: * @key headful > 39: * @bug 4454304 > 40: * @summary On Solaris,TextArea triggers MouseEntered when the mouse is inside the component Suggestion: * @summary On Solaris, TextArea triggers MouseEntered when the mouse is inside the component test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 47: > 45: private static Frame frame; > 46: private static TextArea textArea; > 47: private static List list; Both `list` and `textArea` can be local variables in the `initializeGUI` method. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 48: > 46: private static TextArea textArea; > 47: private static List list; > 48: private static Robot robot; Robot can be a local variable in the `main` method. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 55: > 53: private volatile static Dimension compSize; > 54: > 55: private static MouseListener mListener = new MouseAdapter() { Suggestion: private static final MouseListener mouseListener = new MouseAdapter() { Why not make the field `mouseListener`? test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 101: > 99: robot = new Robot(); > 100: robot.setAutoDelay(100); > 101: robot.setAutoWaitForIdle(true); Suggestion: robot = new Robot(); robot.setAutoDelay(100); robot.setAutoWaitForIdle(true); EventQueue.invokeAndWait(MouseEnterExitTest::initializeGUI); robot.waitForIdle(); Before continuing to get the coordinates of the frame, you want to ensure it's completely shown. ------------- PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1662583031 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1349181886 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1349181089 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1349180170 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1349178806 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1349178102 From aivanov at openjdk.org Fri Oct 6 18:47:12 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 6 Oct 2023 18:47:12 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> References: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> Message-ID: <0wb3XMdAszGX8ca_18jS0OYsAM0wGM_GDq9jh9BhkoU=.11ad2b66-8098-4e2b-9250-4011ce2304e4@github.com> On Wed, 4 Oct 2023 17:23:51 GMT, Harshitha Onkar wrote: > Is there source code fix or PR associated with this test. I couldn't see the answer to this question. I guess the fix was done long time ago in JDK-4454304. Now, the test gets open-sourced. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15961#issuecomment-1751246111 From honkar at openjdk.org Fri Oct 6 19:11:05 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 6 Oct 2023 19:11:05 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v2] In-Reply-To: <0wb3XMdAszGX8ca_18jS0OYsAM0wGM_GDq9jh9BhkoU=.11ad2b66-8098-4e2b-9250-4011ce2304e4@github.com> References: <0G4K_K1ilJHuAIisnQE6OdSRUtH18unzAPV0pyFWib4=.226602a8-746b-4f93-9e4d-5c97cdb944b4@github.com> <0wb3XMdAszGX8ca_18jS0OYsAM0wGM_GDq9jh9BhkoU=.11ad2b66-8098-4e2b-9250-4011ce2304e4@github.com> Message-ID: On Fri, 6 Oct 2023 18:44:22 GMT, Alexey Ivanov wrote: > > Is there source code fix or PR associated with this test. > > I couldn't see the answer to this question. I guess the fix was done long time ago in JDK-4454304. Now, the test gets open-sourced. Correct, and saw @ravigupta30 comments in JBS after this post. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15961#issuecomment-1751286865 From prr at openjdk.org Fri Oct 6 20:11:20 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 6 Oct 2023 20:11:20 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v36] In-Reply-To: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> References: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> Message-ID: <2hpJm6Yce2NcfzV_YdB_19sClNKHFNuRoPFntfTVoZc=.4633ca9e-9887-4f0c-ba20-a1f4e707e7e2@github.com> On Thu, 17 Aug 2023 23:13:51 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 51 commits: > > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - Merge branch 'master' > > CSS.java : > Removes assigning values inside the if-condition > Extracts the assignments into separate line. > > Hex3468DigitsColor.java : > Adds a message to result in case of failure only > - Updates copyright date. > > Updates copyright date to 2023. > - Updates copyright date. > > Updates copyright date to 2023. > - Update imports > > Remove java.util.Pattern and add java.util.Map imports > - Performance improvement > > Performance results came from my repository I mentioned in the header. > > The code before this PR ran in 230ms. > Our previous codes ran in 1 200ms to 1800 ms with String + formatted + %n$s usage. > They ran in 350ms to 380ms with String + formatted + %s usage. > And in 100ms to 110ms if we replace String + format with a string concatenation. > Now the code below gives the same results in 36ms and with all our expected behaviors. Since we control notation length we > can bypass some controls, > directly generate the color value, > without generate a new string, > and reject a wrong number format without generate any exception. > - Corrects a value in a message. > > A message is added to the result in case of failure only. The updated code does not output the actual value. The tested color is #f12a instead of #f00a. > - Simplifications of the test. > > Removes individual color tests and only compares the RGB value. > - Renames an identifier. > > Suggested change, not to use `l` as an identifier because it could be confused with `1`. > This part of code could change and be replaced by bits right rotation after performance tests. > - ... and 41 more: https://git.openjdk.org/jdk/compare/a8ab3be3...6a6af622 Sorry, slow in getting back to this. I ran out test suite against this change. The only problem was that a TCK test failed. It is a negative test which was checking that only the color strings specified to be supported worked. That test will be updated by the TCK team as a result of the CSR which we need to file anyway. I'll create the CSR for you and populate it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1751349203 From jkratochvil at openjdk.org Sat Oct 7 16:33:38 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Sat, 7 Oct 2023 16:33:38 GMT Subject: RFR: 8317696: Fix compilation with clang-16 Message-ID: 8317696: Fix compilation with clang-16 ------------- Commit messages: - 8317696: Fix compilation with clang-16 Changes: https://git.openjdk.org/jdk/pull/16092/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317696 Stats: 17 lines in 4 files changed: 0 ins; 0 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/16092.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16092/head:pull/16092 PR: https://git.openjdk.org/jdk/pull/16092 From ngubarkov at openjdk.org Sat Oct 7 16:58:22 2023 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Sat, 7 Oct 2023 16:58:22 GMT Subject: RFR: 8269806: Emoji rendering on Linux [v20] In-Reply-To: References: Message-ID: On Wed, 5 Apr 2023 14:31:34 GMT, Nikita Gubarkov wrote: >> It was implemented in JetBrains Runtime a year ago and was ported & refactored for this PR >> It includes: >> - Bitmap glyph loading via Freetype >> - Manual scaling & transformation of bitmap glyphs with nearest-neighbor or bilinear-mipmap style algorithms depending on the text antialiasing hint >> - Storing BGRA glyphs in glyph cache & rendering them as plain images, as currently used XRender text drawing functions doesn't support colored glyphs >> - Small fixes in related code like null-checks which could cause NPE & comment typos > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > EmojiFont CRLF -> LF I thought we are on the same page with this, but I will try to explain my idea. We have two PhysicalFonts for mono end colored emoji. Inside fallback sequence we want them to be preferred over one another depending on specific glyph and variation selector used. This is necessary to support emoji and VS the *proper* way. Cheating and using only colored font, forcing monochrome presentation in certain cases is an option, but out of topic. In short: it would require a bunch of new hacks, which we are trying to get rid of, while the result looking not quite how user would expect. Current CompositeFont implementation is strictly linear - all component fonts are tried in sequence, all must be PhysicalFonts (which is an artificial limitation). Anyway, current implementation doesn't permit the desired behavior (leaving aside hacks with exclusion ranges, which are ignored in presence of VS). Natural solution to achieve what we want is to encapsulate our two PhysicalFonts into single virtual emoji font. However then it wouldn't be a PhysicalFont and therefore cannot be used inside CompositeFont. I want to emphasise this - the problem is not with emoji font, but with CompositeFont. Being able to put arbitrary Font2D into CompositeFont is completely logical and legitimate, the restriction is artificial. CompositeFont is too limited for the job, but it can be fixed - the only thing preventing CompositeFont from being able to contain Font2Ds is generally non-bijective mapping of glyph codes. CompositeFont goes easy way and encodes slot index in high byte, leaving others for original glyph code (essentially sequential indices). Of course nesting CompositeFonts would encode slot index into already used high byte, breaking the thing. My solution is to encode glyph codes in such way, that slot index is always inserted in low bits, shifting the original code, thus being able to recursively "wrap" glyph codes (unless we overflow, but we currently don't handle such case anyway). I personally don't see anything bad with it being implemented "just for emoji", because changes to CompositeFont have nothing to do with emoji - it's just a generalization to cover more usage scenaros. I don't know who else could need such complex fallback approaches, but they would at least be possible now. There is one thing which I considered while implementing this though - sometimes users want to configure font fallback behavior, it would be very nice to allow them to construct custom fallback chains (trees, whatever), which would require some refactoring to CompositeFont, and this change is a small step in that direction too. Finally, I understand your concerns that such changes are risky, but the tests are green and changes are battle-tested in JBR, for example, Linux users of JetBrains products are enjoying emoji for around 3 years already ? I keep this PR in sync and include all fixed bugs and regressions, of course. ------------- PR Comment: https://git.openjdk.org/jdk/pull/4798#issuecomment-1751769222 From prr at openjdk.org Sat Oct 7 23:46:19 2023 From: prr at openjdk.org (Phil Race) Date: Sat, 7 Oct 2023 23:46:19 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v36] In-Reply-To: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> References: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> Message-ID: On Thu, 17 Aug 2023 23:13:51 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 51 commits: > > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - Merge branch 'master' > > CSS.java : > Removes assigning values inside the if-condition > Extracts the assignments into separate line. > > Hex3468DigitsColor.java : > Adds a message to result in case of failure only > - Updates copyright date. > > Updates copyright date to 2023. > - Updates copyright date. > > Updates copyright date to 2023. > - Update imports > > Remove java.util.Pattern and add java.util.Map imports > - Performance improvement > > Performance results came from my repository I mentioned in the header. > > The code before this PR ran in 230ms. > Our previous codes ran in 1 200ms to 1800 ms with String + formatted + %n$s usage. > They ran in 350ms to 380ms with String + formatted + %s usage. > And in 100ms to 110ms if we replace String + format with a string concatenation. > Now the code below gives the same results in 36ms and with all our expected behaviors. Since we control notation length we > can bypass some controls, > directly generate the color value, > without generate a new string, > and reject a wrong number format without generate any exception. > - Corrects a value in a message. > > A message is added to the result in case of failure only. The updated code does not output the actual value. The tested color is #f12a instead of #f00a. > - Simplifications of the test. > > Removes individual color tests and only compares the RGB value. > - Renames an identifier. > > Suggested change, not to use `l` as an identifier because it could be confused with `1`. > This part of code could change and be replaced by bits right rotation after performance tests. > - ... and 41 more: https://git.openjdk.org/jdk/compare/a8ab3be3...6a6af622 So there's a pre-existing mess here and I hope we can address it here since it clearly needs addressing. The existing spec. of StyleSheet.stringToColor() is clear that if what is passed in doesn't match what it supports - it returns null. /** * Converts a color string such as "RED" or "#NNNNNN" to a Color. * Note: This will only convert the HTML3.2 color strings * or a string of length 7; * otherwise, it will return null. * * @param string color string such as "RED" or "#NNNNNN" * @return the color */ public Color stringToColor(String string) { return CSS.stringToColor(string); } However since at least JDK 7 the CSS.stringToColor() method that is called says /** * Convert a color string such as "RED" or "#NNNNNN" or "rgb(r, g, b)" * to a Color. */ And indeed it does. But the HTML 3.2 spec says NOTHING about that last format. So this has been out of compliance forever. Here's a program run with JDK 8 that per spec should return null f import javax.swing.text.html.StyleSheet; public class StringToColor { public static void main(String[] args) { StyleSheet ss = new StyleSheet(); Color c = ss.stringToColor("rgb(50 50 50)"); System.out.println(c); } } ~/jdk8/Contents/Home/bin/java StringToColor java.awt.Color[r=50,g=50,b=50] Next in this fix https://bugs.openjdk.org/browse/JDK-8256019 for JDK 17 "rgba" support was added making it even further out of compliance. The test and use case there did not make any direct use of StyleSheet. it just passed HTML text to Swing. So I expect this was overlooked (although there's a comment in the bug report that this didn't appear to be specified which isn't true). Perhaps the same is how rgb() got in too. We need to rectify as much of this as we can. I don't propose to go back to earlier releases and undo changes to match the spec. and we can't go back and update the spec. either. So its probably something we need to live with. The update proposed here should go a very long way to addressing this disconnect, bringing the spec. into alignment with existing implementation. But I think rather than just referencing the CSS spec, it should be explicit in what it supports unless it implements EVERY SINGLE THING that spec says. And clearly it does not ! Now we also have this PR https://github.com/openjdk/jdk/pull/15262/ which so far as I can tell is intended to bring the CSS support for rgb/rgba into alignment with the CSS spec. So clearly that PR needs to be merged into this one. I KNOW we already merged another PR into here but this whole thing needs to be ONE PR. We can't put spec implementation later and we can't put implementation which (further!) contradicts the spec. Then when we get all of these together I need to see that it really implements what the spec. says and if it doesn't we'll need to call out what is supported. And either way the spec. would benefit from at least some examples of each case, as to what are valid values for r,g,b and a. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1545: > 1543: Map.entry("olive", new Color(128, 128, 0)), > 1544: Map.entry("olivedrab", new Color(107, 142, 35)), > 1545: Map.entry("orange", new Color(255, 165, 0)), I see this differs from the previous definition of orange color = hexToColor("#FF8000"); but it looks like the new value matches the CSS spec, so the existing value may have been based on some outdated CSS spec .. or a bug .. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 70: > 68: {null, null}, > 69: // This color doesn't belong to the CSS-COLOR-4 specification > 70: {"com.scientificware.color", null}, if you are going to test using a made up colour name, in this context, I think "openjdk.org" or even better "notacolor", might be more appropriate. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 116: > 114: {"dimgray", "ff696969"}, > 115: {"dimgrey", "ff696969"}, > 116: {"dodgerblue", "ff1e90ff"}, Seriously ? That's in CSS ? The committee must have been loaded with people from SoCal .. where's "giantsorange" ? ------------- Changes requested by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/9825#pullrequestreview-1636378814 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1332099808 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1332121449 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1332124035 From prr at openjdk.org Sat Oct 7 23:49:03 2023 From: prr at openjdk.org (Phil Race) Date: Sat, 7 Oct 2023 23:49:03 GMT Subject: RFR: JDK-8294090 : Aligns the CSS and function behaviours [v3] In-Reply-To: References: Message-ID: On Sun, 20 Aug 2023 23:07:01 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.java.com/bugdatabase/view_bug?bug_id=8294090) >> >> This is tracked in JBS as >> - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.openjdk.java.net/browse/JDK-8294090) >> >> Aligns the `` and `` function behaviours in CSS.java, as described in : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [4.1 The `` syntax](https://www.w3.org/TR/css-color-4/#color-syntax) >> [6.1. The RGB functions: rgb() and rgba()](https://www.w3.org/TR/css-color-4/#funcdef-rgb) >> >> Designed from : [ScientificWare JDK-8294090 : Aligns the CSS and function behaviours](https://github.com/scientificware/jdk/issues/16) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Merge branch 'scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours' of github.com:scientificware/jdk into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours > - Merge branch 'openjdk:master' into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours > - Merge master > - RGBandRGBAalignmentBehaviours.java : > - Change list name. > - CSS.java : > - Adds a comment about consecutive non space separators. > - Adds e uppercase test. > > RGBandRGBAalignmentBehaviours.java : > - Adds test cases with uppercase e. > - Merge master > - 8294090 : Corrects RGBandRGBAalignmentBehaviours.java file permission. > - 8294090 : > > CSS.java : > - Adds links to CSS-COLOR-4 and CSS-VALUE-4 specifications. > - Update PARSE RGB method comments. > - Adds base-ten exponent support. > > RGBandRGBAalignmentBehaviours.java : > - Adds a set of tests for RGB functions. > - Merge master > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Am?lioration de la prise en charge des fonctions rgb et rgba concernant les couleurs. Changes requested by prr (Reviewer). Read the comment in https://github.com/openjdk/jdk/pull/9825. This PR needs to be merged into that PR and this PR withdrawn. Bugs should be closed as dups. I don't intend to do a detailed review of this PR until the content is merged into the other one. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1458: > 1456: * specifications. > 1457: * By example rgb(rc gc bc), > 1458: * rgb(rc,gc,bc), rgb(rc gc bc / ac), For many years javadoc has preferred {@code rgb(rc,gc,bc)} instead of .... Since this comment is being updated existing and new cases should be converted. ------------- PR Review: https://git.openjdk.org/jdk/pull/15262#pullrequestreview-1636391087 PR Comment: https://git.openjdk.org/jdk/pull/15262#issuecomment-1751866720 PR Comment: https://git.openjdk.org/jdk/pull/15262#issuecomment-1751867052 PR Review Comment: https://git.openjdk.org/jdk/pull/15262#discussion_r1332107583 From javalists at cbfiddle.com Sun Oct 8 13:52:40 2023 From: javalists at cbfiddle.com (Alan Snyder) Date: Sun, 8 Oct 2023 06:52:40 -0700 Subject: Fwd: Metal renderer threading issues [macOS] References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> Message-ID: I?ve been investigating a problem with a long running application that accumulates an apparently unbounded number of CVDisplayLink threads. I do not yet have an explanation or a test case. The code that creates and releases CVDisplayLinks looks fine, but that assumes there are no threading issues. It looks like there are threading issues. Specifically, it appears that the startDisplayLink and stopDisplayLink methods of the Objective-C class MTLLayer are invoked on multiple threads. They are invoked on the AppKit main thread from screen sleep notifications and blitTexture. They are invoked on the EDT from MTLLayer.validate. They are invoked on the Queue Flusher thread from MTLRenderQueue.flushBuffer. Perhaps someone familiar with this code could comment? From davidalayachew at gmail.com Sat Oct 7 05:50:37 2023 From: davidalayachew at gmail.com (David Alayachew) Date: Sat, 7 Oct 2023 01:50:37 -0400 Subject: Could we/May I fix the Swing Tutorial for Monitoring Progress? Message-ID: Hello Client Libs Dev Team, The Swing tutorials found here ( https://docs.oracle.com/javase/tutorial/uiswing/) are top-notch, as detailed as they need to be, and beginner friendly. These tutorials are excellent, and I have most of the links on that page bookmarked, as I reference them frequently when building GUI's. That is why it is so surprising to see that the tutorial for Monitoring Progress is so much worse than most of the others. Here is a link to the tutorial in question. https://docs.oracle.com/javase/tutorial/uiswing/components/progress.html I have the short version of my thoughts here ( https://stackoverflow.com/questions/24835638/issues-with-swingworker-and-jprogressbar/24835935#comment136182857_24835935). But I'll try and keep things down to what's needed. For starters, the tutorial feels backwards. Normally, you would start with the most basic/common use-cases first, then delve into the fringe/uncommon use-cases later on in the tutorial. That is not what happens. We start off with the more complex and configurable JProgressBar, and it is only after we reach the halfway point of the tutorial, does it decide to let us know that the ProgressMonitor, the simpler and more constrained option, is available to us. This makes the on-ramp for learning this tool needlessly steeper, just by approaching things in the wrong order. Compare and contrast this to the Dialog tutorial ( https://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html). They follow a similar premise -- there is the complex JDialog, and the simple JOptionPane. However, the Dialog tutorial gets it right. They start off with an explicit intro that says "Here are 2 API's, one complex, one simple. We will start with the simple one, but if it does not meet your needs, you can easily switch to (or even compose your JOptionPane into) the JDialog, allowing you to add complexity, only where necessary." This is beginner friendly because it gives the most common use case first, and then lets the user read on if they need something more complex. Next, the code example they gave is spaghetti-code. Please look at it here ( https://docs.oracle.com/javase/tutorial/uiswing/examples/components/ProgressBarDemoProject/src/components/ProgressBarDemo.java). Everything is bundled into a single file, when there's really at least 3 files here. It makes the example so difficult to read and follow along with, as you struggle to put boundaries on what can and cannot occur at any given point in the code. After that, they pick the most beginner unfriendly way to demonstrate concurrency to the user. Monitoring progress and updating the progress bar simultaneously necessitates using Concurrency in Swing (understandable). Therefore, the tutorial encourages the user to accomplish this using the class SwingWorker (as they should). But then, they pick the literal most complex and foot-gun like way to do things - so much so that it defeats the entire point. They tell the user to use SwingWorker::setProgress, which fires an event to PropertyChangeListener, which can then be extracted from the ::getNewValue method from the "progress" PropertyChangeEvent. Already, that's unideal, but the real footgun is that there is the undocumented invariant that the value you pass to ::setProgress must be between 0-100. This is particularly foot-gun like because JProgressBar allows you to set the value to whatever you want, and it will calculate the ratio for you (very nice). Many developers will opt in to this convenience feature, and thus, will be setting themselves up for failure when they try to follow the tutorials direction of using a PropertyChangeListener, thinking they can just pass in the new value for JProgressBar::setValue via the PropertyChangeListener. This entire foot-gun situation could have easily been avoided if they just used the ::publish/::process pair of methods, which are not only simpler, but also facilitate the bundling of events, should the developer choose to get involved with that. Hopefully I have demonstrated how this particular tutorial has problems. If so, I volunteer my time and efforts to fixing this tutorial. If anyone could point me to the right place, I will happily submit a JBS ticket, and then get started making the commit. And I want to emphasize - the Oracle Swing tutorials are excellent. I tutor, and when I teach Swing/GUI's, I always encourage them to start with the Oracle Swing tutorials. That's my biggest reason for doing this - I want to be able to say that about this tutorial too. Please let me know your thoughts. Thank you all for your time! David Alayachew -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.race at oracle.com Sun Oct 8 23:23:44 2023 From: philip.race at oracle.com (Philip Race) Date: Sun, 8 Oct 2023 16:23:44 -0700 Subject: Could we/May I fix the Swing Tutorial for Monitoring Progress? In-Reply-To: References: Message-ID: <4c35baa1-dc21-e9a5-62ee-63beea7c6500@oracle.com> This won't be possible. The tutorial is not maintained as part of the OpenJDK project. It is an Oracle proprietary document owned by the appropriate Oracle internal organisation. So you won't find the source for it anywhere. -phil. On 10/6/23 10:50 PM, David Alayachew wrote: > Hello Client Libs Dev Team, > > The Swing tutorials found here > (https://docs.oracle.com/javase/tutorial/uiswing/) are top-notch, as > detailed as they need to be, and beginner friendly. These tutorials > are excellent, and I have most of the links on that page bookmarked, > as I reference them frequently when building GUI's. > > That is why it is so surprising to see that the tutorial for > Monitoring Progress is so much worse than most of the others. Here is > a link to the tutorial in question. > > https://docs.oracle.com/javase/tutorial/uiswing/components/progress.html > > I have the short version of my thoughts here > (https://stackoverflow.com/questions/24835638/issues-with-swingworker-and-jprogressbar/24835935#comment136182857_24835935). > But I'll try and keep things down to what's needed. > > For starters, the tutorial feels backwards. Normally, you would start > with the most basic/common use-cases first, then delve into the > fringe/uncommon use-cases later on in the tutorial. That is not what > happens. We start off with the more complex and configurable > JProgressBar, and it is only after we reach the halfway point of the > tutorial, does it decide to let us know that the ProgressMonitor, the > simpler and more constrained option, is available to us. This makes > the on-ramp for learning this tool needlessly steeper, just by > approaching things in the wrong order. > > Compare and contrast this to the Dialog tutorial > (https://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html). > They follow a similar premise -- there is the complex JDialog, and the > simple JOptionPane. However, the Dialog tutorial gets it right. They > start off with an explicit intro that says "Here are 2 API's, one > complex, one simple. We will start with the simple one, but if it does > not meet your needs, you can easily switch to (or even compose your > JOptionPane into) the JDialog, allowing you to add complexity, only > where necessary." This is beginner friendly because it gives the most > common use case first, and then lets the user read on if they need > something more complex. > > Next, the code example they gave is spaghetti-code. Please look at it > here > (https://docs.oracle.com/javase/tutorial/uiswing/examples/components/ProgressBarDemoProject/src/components/ProgressBarDemo.java). > Everything is bundled into a single file, when there's really at least > 3 files here. It makes the example so difficult to read and follow > along with, as you struggle to put boundaries on what can and cannot > occur at any given point in the code. > > After that, they pick the most beginner unfriendly way to demonstrate > concurrency to the user. > > Monitoring progress and updating the progress bar simultaneously > necessitates using Concurrency in Swing (understandable). Therefore, > the tutorial encourages the user to accomplish this using the class > SwingWorker (as they should). But then, they pick the literal most > complex and foot-gun like way to do things - so much so that it > defeats the entire point. > > They tell the user to use SwingWorker::setProgress, which fires an > event to PropertyChangeListener, which can then be extracted from the > ::getNewValue method from the "progress" PropertyChangeEvent. Already, > that's unideal, but the real footgun is that there is the undocumented > invariant that the value you pass to ::setProgress must be between > 0-100. This is particularly foot-gun like because JProgressBar allows > you to set the value to whatever you want, and it will calculate the > ratio for you (very nice). Many developers will opt in to this > convenience feature, and thus, will be setting themselves up for > failure when they try to follow the tutorials direction of using a > PropertyChangeListener, thinking they can just pass in the new value > for JProgressBar::setValue via the PropertyChangeListener. > > This entire foot-gun situation could have easily been avoided if they > just used the ::publish/::process pair of methods, which are not only > simpler, but also facilitate the bundling of events, should the > developer choose to get involved with that. > > Hopefully I have demonstrated how this particular tutorial has problems. > > If so, I volunteer my time and efforts to fixing this tutorial. If > anyone could point me to the right place, I will happily submit a JBS > ticket, and then get started making the commit. > > And I want to emphasize - the Oracle Swing tutorials are excellent. I > tutor, and when I teach Swing/GUI's, I always encourage them to start > with the Oracle Swing tutorials. That's my biggest reason for doing > this - I want to be able to say that about this tutorial too. > > Please let me know your thoughts. > > Thank you all for your time! > David Alayachew -------------- next part -------------- An HTML attachment was scrubbed... URL: From duke at openjdk.org Mon Oct 9 03:20:17 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 9 Oct 2023 03:20:17 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v14] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Modified condition based or review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/0502dc94..4fe5c79d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=13 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=12-13 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From duke at openjdk.org Mon Oct 9 03:20:20 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 9 Oct 2023 03:20:20 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v13] In-Reply-To: References: Message-ID: <065j7yPwSBlOr3T148qTsTJ5Dhw_LU1_o3Z85xHhRw0=.18a1f697-1871-4c83-a388-b65b45c4ac13@github.com> On Fri, 6 Oct 2023 15:55:54 GMT, Alexey Ivanov wrote: >> Renjith Kannath Pariyangad has updated the pull request incrementally with three additional commits since the last revision: >> >> - Whitespace error fixed >> - Whitespace error fixed >> - CoInitializeEx error check modified with better condition > > src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 234: > >> 232: } >> 233: >> 234: if(hr != RPC_E_CHANGED_MODE) { > > Suggestion: > > if (hr != RPC_E_CHANGED_MODE) { > > Space between the `if` keyword and the opening parenthesis. Included all suggestions ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1349834270 From duke at openjdk.org Mon Oct 9 05:07:13 2023 From: duke at openjdk.org (Ravi Gupta) Date: Mon, 9 Oct 2023 05:07:13 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v3] In-Reply-To: References: Message-ID: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: 8316947: Review comments solved ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15961/files - new: https://git.openjdk.org/jdk/pull/15961/files/a9518ac5..4a57de9b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=01-02 Stats: 13 lines in 1 file changed: 2 ins; 4 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/15961.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15961/head:pull/15961 PR: https://git.openjdk.org/jdk/pull/15961 From psadhukhan at openjdk.org Mon Oct 9 05:25:27 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 9 Oct 2023 05:25:27 GMT Subject: RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager Message-ID: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> Issue is if one internal frame is open and maximized and another internal frame is created which is initialized with setMaximum(true) then after opening the second internal frame both internal frames are non-maximized It can also be seen with SwingSet2 JInternalFrameDemo in WIndowsLookAndFeel i.e. when Frame 0 is maximised, and then Frame1 is maximised and then minimised, Frame0 should remain maximised but it is now unmaximised Issues seen with JInternalFrame in WindowsLookAndFeel are - Frame 0 maximised - Frame 4 maximised, when minimised, Frame0 is seen to be restored to normal size with Frame4 minimised - Frame 0 is again maximised - Frame 4 maximised from minimised, instead of maximising, it restores both Frame0 and Frame4 The fix makes sure the maximised internal frame remains maximised when the 2nd internal frame is maximised This code seems to be added for [JDK-5036083](https://bugs.openjdk.org/browse/JDK-5036083) which expects `When a frame is maximized and then minimized, the next frame should NOT be maximized.` It still honours that fix as the test mentioned in JDK-5036083 works as expected as mentioned above Also it is mentioned https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java#L69-L70 It can be seen it is still honored. In SwingSet2 JInternalFrameDemo in WindowsL&F, if Frame0 is maximised and then Frame1 is activated/selected, it becomes maximised Also, it doesn't cause any regression with our existing closed/open tests. ------------- Commit messages: - 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager - 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager Changes: https://git.openjdk.org/jdk/pull/16097/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16097&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6681958 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16097.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16097/head:pull/16097 PR: https://git.openjdk.org/jdk/pull/16097 From psadhukhan at openjdk.org Mon Oct 9 06:12:10 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 9 Oct 2023 06:12:10 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 17:34:54 GMT, Andy Goryachev wrote: > With the latest change, it behaves as expected on the primary retina screen. > > However, something is wrong if I put it on the secondary monitor right after the launch: I am still getting inconsistent behavior, incorrect button location, and visual artifacts. > > For example, one time there is no button after the first click. The button appears when I resize the window. > > Another time, the button is in the corner again and some visual artifacts are present (see the screenshots below). > > Perhaps we need to update the scale somewhere? > I am not able to reproduce these issues (apart from JDK-8298796) in windows primary and secondary monitor (primary 1.25 1920x1080, secondary 1.0 1920x1080, doesn't have FX setup in mac to test ...Also, I dont see how window can be painted red as the test doesn't do that so how did you get RED background) I think you are seeing the scale issue what you already mentioned in here https://github.com/openjdk/jfx/pull/1171#issuecomment-1664410463 and Kevin mentioned https://github.com/openjdk/jfx/pull/1171#issuecomment-1667808162 and https://github.com/openjdk/jfx/pull/1171#pullrequestreview-1567558748 so I guess it's an existing issue in mac and not something that this fix has caused and since you confirmed this works on primary screen, can we push this and you can raise a macos FX bug regarding scale not being propagated to window (which might require change in non swing-interop FX code) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1752394375 From tr at openjdk.org Mon Oct 9 06:28:09 2023 From: tr at openjdk.org (Tejesh R) Date: Mon, 9 Oct 2023 06:28:09 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 16:43:17 GMT, Prasanta Sadhukhan wrote: > A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog > Fix is to make sure the option pane dialog is always on top.... The fix is working fine with the test mentioned in JBS. Any reason for not adding a test for the fix? ------------- PR Review: https://git.openjdk.org/jdk/pull/16060#pullrequestreview-1663780562 From clanger at openjdk.org Mon Oct 9 06:38:06 2023 From: clanger at openjdk.org (Christoph Langer) Date: Mon, 9 Oct 2023 06:38:06 GMT Subject: RFR: 8317706: Exclude java/awt/Graphics2D/DrawString/RotTransText.java on linux Message-ID: <3nH9tJOKVBUNd151FLMxDLREQqITWGSt9ZIE6hFId7I=.fd9f7c0c-b247-4b7c-a2bc-273909a79cfb@github.com> This test is failing on several Linux configurations (SLES 15), so it should be excluded. ------------- Commit messages: - JDK-8317706 Changes: https://git.openjdk.org/jdk/pull/16096/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16096&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317706 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16096/head:pull/16096 PR: https://git.openjdk.org/jdk/pull/16096 From psadhukhan at openjdk.org Mon Oct 9 07:25:08 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 9 Oct 2023 07:25:08 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 06:25:08 GMT, Tejesh R wrote: > The fix is working fine with the test mentioned in JBS. Any reason for not adding a test for the fix? I couldn't get ways to do automated test for this and manual test using PassFailJFrame doesn't support multiple test windows which this test needs.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1752466926 From duke at openjdk.org Mon Oct 9 14:28:17 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 9 Oct 2023 14:28:17 GMT Subject: RFR: JDK-8294090 : Aligns the CSS and function behaviours [v3] In-Reply-To: References: Message-ID: On Sun, 20 Aug 2023 23:07:01 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.java.com/bugdatabase/view_bug?bug_id=8294090) >> >> This is tracked in JBS as >> - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.openjdk.java.net/browse/JDK-8294090) >> >> Aligns the `` and `` function behaviours in CSS.java, as described in : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [4.1 The `` syntax](https://www.w3.org/TR/css-color-4/#color-syntax) >> [6.1. The RGB functions: rgb() and rgba()](https://www.w3.org/TR/css-color-4/#funcdef-rgb) >> >> Designed from : [ScientificWare JDK-8294090 : Aligns the CSS and function behaviours](https://github.com/scientificware/jdk/issues/16) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Merge branch 'scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours' of github.com:scientificware/jdk into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours > - Merge branch 'openjdk:master' into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours > - Merge master > - RGBandRGBAalignmentBehaviours.java : > - Change list name. > - CSS.java : > - Adds a comment about consecutive non space separators. > - Adds e uppercase test. > > RGBandRGBAalignmentBehaviours.java : > - Adds test cases with uppercase e. > - Merge master > - 8294090 : Corrects RGBandRGBAalignmentBehaviours.java file permission. > - 8294090 : > > CSS.java : > - Adds links to CSS-COLOR-4 and CSS-VALUE-4 specifications. > - Update PARSE RGB method comments. > - Adds base-ten exponent support. > > RGBandRGBAalignmentBehaviours.java : > - Adds a set of tests for RGB functions. > - Merge master > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Am?lioration de la prise en charge des fonctions rgb et rgba concernant les couleurs. I close the PR JDK-8294090 and I'll merge its content in #9825. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15262#issuecomment-1753115768 From duke at openjdk.org Mon Oct 9 14:28:19 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 9 Oct 2023 14:28:19 GMT Subject: Withdrawn: JDK-8294090 : Aligns the CSS and function behaviours In-Reply-To: References: Message-ID: On Sun, 13 Aug 2023 18:17:57 GMT, ScientificWare wrote: > This is referenced in Java Bug Database as > - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.java.com/bugdatabase/view_bug?bug_id=8294090) > > This is tracked in JBS as > - [JDK-8294090 : Aligns the CSS `` and `` function behaviours](https://bugs.openjdk.java.net/browse/JDK-8294090) > > Aligns the `` and `` function behaviours in CSS.java, as described in : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [4.1 The `` syntax](https://www.w3.org/TR/css-color-4/#color-syntax) > [6.1. The RGB functions: rgb() and rgba()](https://www.w3.org/TR/css-color-4/#funcdef-rgb) > > Designed from : [ScientificWare JDK-8294090 : Aligns the CSS and function behaviours](https://github.com/scientificware/jdk/issues/16) This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15262 From djelinski at openjdk.org Mon Oct 9 14:43:10 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Mon, 9 Oct 2023 14:43:10 GMT Subject: RFR: 8317696: Fix compilation with clang-16 In-Reply-To: References: Message-ID: On Sat, 7 Oct 2023 16:24:29 GMT, Jan Kratochvil wrote: > `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` > > While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. > > > src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > phost = (*g_network_address_get_hostname)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > pport = (*g_network_address_get_port)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_strfreev)(proxies); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_clear_error)(&error); > ^ > Compiling X11Renderer.c (for libawt_headless.so) > In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: > In file included from src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h:29: > src/java.desktop/unix/native/common/aw... Changes requested by djelinski (Reviewer). src/java.base/unix/native/libnet/DefaultProxySelector.c line 96: > 94: typedef GProxyResolver* g_proxy_resolver_get_default_func(void); > 95: typedef char** g_proxy_resolver_lookup_func(GProxyResolver* resolver, char* uri, void *null, GError **error_p); > 96: typedef GSocketConnectable* g_network_address_parse_uri_func(char* proxy, int zero, GError **error_p); Suggestion: typedef GSocketConnectable* g_network_address_parse_uri_func(char* proxy, unsigned short default_port, GError **error_p); https://developer-old.gnome.org/gio/stable/GNetworkAddress.html#g-network-address-parse-uri src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c line 218: > 216: static GtkWidget* (*fp_gtk_menu_bar_new)(); > 217: static GtkWidget* (*fp_gtk_menu_item_new)(); > 218: static GtkWidget* (*fp_gtk_notebook_new)(void); This change is inconsistent with the surrounding style; I'd keep the original declaration, and only remove the NULL in function calls. ------------- PR Review: https://git.openjdk.org/jdk/pull/16092#pullrequestreview-1664342423 PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1350242526 PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1350396505 From duke at openjdk.org Mon Oct 9 14:52:28 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 9 Oct 2023 14:52:28 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v36] In-Reply-To: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> References: <1fDd9vISyctliZDezajILKXpGgiSgQLwitkfgI9lz-o=.949961f5-5447-47eb-b026-0f6de2617b95@github.com> Message-ID: <9N6Zmkz3FP1dwttQNgyaEifwDMvzZh4ElNCJFLiMvck=.46eb4738-fa5c-411c-82c9-be122cee5ebf@github.com> On Thu, 17 Aug 2023 23:13:51 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 51 commits: > > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - Merge branch 'master' > > CSS.java : > Removes assigning values inside the if-condition > Extracts the assignments into separate line. > > Hex3468DigitsColor.java : > Adds a message to result in case of failure only > - Updates copyright date. > > Updates copyright date to 2023. > - Updates copyright date. > > Updates copyright date to 2023. > - Update imports > > Remove java.util.Pattern and add java.util.Map imports > - Performance improvement > > Performance results came from my repository I mentioned in the header. > > The code before this PR ran in 230ms. > Our previous codes ran in 1 200ms to 1800 ms with String + formatted + %n$s usage. > They ran in 350ms to 380ms with String + formatted + %s usage. > And in 100ms to 110ms if we replace String + format with a string concatenation. > Now the code below gives the same results in 36ms and with all our expected behaviors. Since we control notation length we > can bypass some controls, > directly generate the color value, > without generate a new string, > and reject a wrong number format without generate any exception. > - Corrects a value in a message. > > A message is added to the result in case of failure only. The updated code does not output the actual value. The tested color is #f12a instead of #f00a. > - Simplifications of the test. > > Removes individual color tests and only compares the RGB value. > - Renames an identifier. > > Suggested change, not to use `l` as an identifier because it could be confused with `1`. > This part of code could change and be replaced by bits right rotation after performance tests. > - ... and 41 more: https://git.openjdk.org/jdk/compare/a8ab3be3...6a6af622 PR JDK-8294090 #15262 is closed. Its content will be merged in this PR after applying requiered changes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1753156340 From jkratochvil at openjdk.org Mon Oct 9 14:54:14 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Mon, 9 Oct 2023 14:54:14 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v2] In-Reply-To: References: Message-ID: <3qea9Ojjc6Q317U6dJHiY8_EwdMvnKweDTeSd_dqQzU=.9b5734d6-b122-4852-90a3-113df5defaaa@github.com> > `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` > > While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. > > > src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > phost = (*g_network_address_get_hostname)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > pport = (*g_network_address_get_port)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_strfreev)(proxies); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_clear_error)(&error); > ^ > Compiling X11Renderer.c (for libawt_headless.so) > In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: > In file included from src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h:29: > src/java.desktop/unix/native/common/aw... Jan Kratochvil has updated the pull request incrementally with two additional commits since the last revision: - Update src/java.base/unix/native/libnet/DefaultProxySelector.c Co-authored-by: Daniel Jelinski - Update also gtk3_interface.h prototypes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16092/files - new: https://git.openjdk.org/jdk/pull/16092/files/05c4054d..6c2c2f87 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=00-01 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/16092.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16092/head:pull/16092 PR: https://git.openjdk.org/jdk/pull/16092 From jkratochvil at openjdk.org Mon Oct 9 15:01:41 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Mon, 9 Oct 2023 15:01:41 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: > `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` > > While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. > > > src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > phost = (*g_network_address_get_hostname)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > pport = (*g_network_address_get_port)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_strfreev)(proxies); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_clear_error)(&error); > ^ > Compiling X11Renderer.c (for libawt_headless.so) > In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: > In file included from src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h:29: > src/java.desktop/unix/native/common/aw... Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: Remove declaration changes which are not required - suggested by djelinski ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16092/files - new: https://git.openjdk.org/jdk/pull/16092/files/6c2c2f87..fa2c32e4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=01-02 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/16092.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16092/head:pull/16092 PR: https://git.openjdk.org/jdk/pull/16092 From jkratochvil at openjdk.org Mon Oct 9 15:01:45 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Mon, 9 Oct 2023 15:01:45 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: <2tYOw3UPK-A_WyEI7zHIazNX5-6Ad69bZbYd799AiwQ=.770053ff-b482-4c76-9afb-48d3a36111ae@github.com> On Mon, 9 Oct 2023 14:38:27 GMT, Daniel Jeli?ski wrote: >> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove declaration changes which are not required >> - suggested by djelinski > > src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c line 218: > >> 216: static GtkWidget* (*fp_gtk_menu_bar_new)(); >> 217: static GtkWidget* (*fp_gtk_menu_item_new)(); >> 218: static GtkWidget* (*fp_gtk_notebook_new)(void); > > This change is inconsistent with the surrounding style; I'd keep the original declaration, and only remove the NULL in function calls. I did not notice it is not required to change the prototype. OK, it works without this change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1350418413 From aivanov at openjdk.org Mon Oct 9 15:15:05 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 9 Oct 2023 15:15:05 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v3] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 05:07:13 GMT, Ravi Gupta wrote: >> Write a test to check textArea triggers MouseEntered/MouseExited events properly >> >> MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. >> >> In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) >> >> Testing: >> Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. > > Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: > > 8316947: Review comments solved Changes requested by aivanov (Reviewer). test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 50: > 48: private volatile static boolean passed = true; > 49: private volatile static Point compAt; > 50: private volatile static Dimension compSize; To my personal taste, I'd add blank line to visually separate groups of fields: Suggestion: private static Frame frame; private volatile static boolean entered = false; private volatile static boolean exited = false; private volatile static boolean passed = true; private volatile static Point compAt; private volatile static Dimension compSize; test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 53: > 51: > 52: private static final MouseListener mouseListener = new MouseAdapter() { > 53: public void mouseEntered(MouseEvent e) { Suggestion: private static final MouseListener mouseListener = new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { Let's add `@Override` annotations, it's basically a new code, so it's better to add them. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 63: > 61: } > 62: > 63: public void mouseExited(MouseEvent e) { Suggestion: @Override public void mouseExited(MouseEvent e) { test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 101: > 99: EventQueue.invokeAndWait(MouseEnterExitTest::initializeGUI); > 100: robot.waitForIdle(); > 101: EventQueue.invokeAndWait(() -> { Suggestion: robot.waitForIdle(); EventQueue.invokeAndWait(() -> { test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 110: > 108: robot.mouseMove(i, compAt.y); > 109: } > 110: if (!passed || entered || !exited) { Suggestion: if (!passed || entered || !exited) { A couple of blank lines in the `main` method. test/jdk/java/awt/event/MouseEvent/MouseEnterExitTest.java line 121: > 119: } > 120: > 121: public static void disposeFrame() { Suggestion: private static void disposeFrame() { It should be private. ------------- PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1664717599 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350432826 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350434252 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350434537 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350435567 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350436186 PR Review Comment: https://git.openjdk.org/jdk/pull/15961#discussion_r1350436889 From achung at openjdk.org Mon Oct 9 16:48:57 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 9 Oct 2023 16:48:57 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 16:43:17 GMT, Prasanta Sadhukhan wrote: > A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog > Fix is to make sure the option pane dialog is always on top.... Would it be better to check if the JFrame is "always on top" before making the JOptionPane also always on top? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1753342445 From angorya at openjdk.org Mon Oct 9 17:34:59 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Mon, 9 Oct 2023 17:34:59 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add let me test this on windows. in the mean time, do you know why the checks are consistently failing for this PR? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1753397869 From aivanov at openjdk.org Mon Oct 9 18:37:00 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 9 Oct 2023 18:37:00 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 15:01:41 GMT, Jan Kratochvil wrote: >> `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` >> >> While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. >> >> >> src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_network_address_parse_uri)(proxies[i], 0, >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> phost = (*g_network_address_get_hostname)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> pport = (*g_network_address_get_port)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_strfreev)(proxies); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_clear_error)(&error); >> ^ >> Compiling X11Renderer.c (for libawt_headless.so) >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11Surf... > > Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: > > Remove declaration changes which are not required > - suggested by djelinski The changes for `java.desktop` look good to me. src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h line 53: > 51: #define MITSHM_PERM_OWNER (0600) > 52: > 53: extern int XShmQueryExtension(Display* dpy); I wonder if it's even needed here: the declaration should come from `X11/extensions/XShm.h` which is included. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16092#pullrequestreview-1665070667 PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1350667139 From djelinski at openjdk.org Mon Oct 9 18:42:00 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Mon, 9 Oct 2023 18:42:00 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 15:01:41 GMT, Jan Kratochvil wrote: >> `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` >> >> While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. >> >> >> src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_network_address_parse_uri)(proxies[i], 0, >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> phost = (*g_network_address_get_hostname)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> pport = (*g_network_address_get_port)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_strfreev)(proxies); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_clear_error)(&error); >> ^ >> Compiling X11Renderer.c (for libawt_headless.so) >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11Surf... > > Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: > > Remove declaration changes which are not required > - suggested by djelinski Marked as reviewed by djelinski (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16092#pullrequestreview-1665089916 From aivanov at openjdk.org Mon Oct 9 18:43:03 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 9 Oct 2023 18:43:03 GMT Subject: RFR: 8317706: Exclude java/awt/Graphics2D/DrawString/RotTransText.java on linux In-Reply-To: <3nH9tJOKVBUNd151FLMxDLREQqITWGSt9ZIE6hFId7I=.fd9f7c0c-b247-4b7c-a2bc-273909a79cfb@github.com> References: <3nH9tJOKVBUNd151FLMxDLREQqITWGSt9ZIE6hFId7I=.fd9f7c0c-b247-4b7c-a2bc-273909a79cfb@github.com> Message-ID: On Sun, 8 Oct 2023 22:15:59 GMT, Christoph Langer wrote: > This test is failing on several Linux configurations (SLES 15), so it should be excluded. Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16096#pullrequestreview-1665090306 From aivanov at openjdk.org Mon Oct 9 18:57:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 9 Oct 2023 18:57:16 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v14] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 03:20:17 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Modified condition based or review Looks good except for the minor nit. src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 187: > 185: } > 186: > 187: HRESULT hr=::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); Suggestion: HRESULT hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); Spaces around the assignment operator. ------------- PR Review: https://git.openjdk.org/jdk/pull/14898#pullrequestreview-1665102713 PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1350694116 From philip.race at oracle.com Mon Oct 9 19:27:57 2023 From: philip.race at oracle.com (Philip Race) Date: Mon, 9 Oct 2023 12:27:57 -0700 Subject: Fwd: Metal renderer threading issues [macOS] In-Reply-To: References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> Message-ID: I can't find any Apple docs saying anything like "invoke this only on the Appkit thread", perhaps because you don't have to, but nor do I see any caution about using a consistent thread. The JDK code to start a thread is - (void) startDisplayLink { ??? if (!CVDisplayLinkIsRunning(self.displayLink)) { ??????? CVDisplayLinkStart(self.displayLink); ??????? J2dTraceLn(J2D_TRACE_VERBOSE, "MTLLayer_startDisplayLink"); ??? } ??? displayLinkCount += KEEP_ALIVE_INC; // Keep alive displaylink counter } and I can see how at least in theory two threads could be calling this code at the same time and so start two threads. Although I'm a bit surprised if macOS doesn't detect this internally and reject it and return an error. And we aren't checking for error returns, but in the case of an error return, I'd really expect that to mean it did not start the thread. You could try enabling java2d logging to see if we at least have matching numbers of calls to start & stop. But I can imagine that if we've overwritten a field holding is the display link thread reference that CVDisplayLinkStop can't stop that leaked thread. A relatively simple experiment, that doesn't need JDK would be to just call CVDisplayLinkStart N times, checking return value and then call CVDisplayLinkStop N times (again checking return value, and at the end of it see how many threads are running. Probably that will tell us we do need to run all these calls on one of those 3 threads (AppKit, EDT, QueueFlusher), although I'm not sure what implementation and performance consequences might ensue. You should file a bug with as much info as you can gather. -phil. On 10/8/23 6:52 AM, Alan Snyder wrote: > I?ve been investigating a problem with a long running application that accumulates an apparently unbounded number of > CVDisplayLink threads. I do not yet have an explanation or a test case. > > The code that creates and releases CVDisplayLinks looks fine, but that assumes there are no threading issues. > It looks like there are threading issues. > > Specifically, it appears that the startDisplayLink and stopDisplayLink methods of the Objective-C class MTLLayer are invoked on multiple threads. > > They are invoked on the AppKit main thread from screen sleep notifications and blitTexture. > > They are invoked on the EDT from MTLLayer.validate. > > They are invoked on the Queue Flusher thread from MTLRenderQueue.flushBuffer. > > Perhaps someone familiar with this code could comment? > From duke at openjdk.org Mon Oct 9 21:40:11 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 9 Oct 2023 21:40:11 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v37] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 55 commits: - Merge master - MissingColorNames.java : - Add a subset of RGB and RGBA tests. - MissingColorNames.java : - rename the list of string test. CSS.java : - correct a wrong index. - MissingColorNames.java : Adds a subset of hexadecimal tests. - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color # Conflicts: # src/java.desktop/share/classes/javax/swing/text/html/CSS.java - Merge master - Merge branch 'master' CSS.java : Removes assigning values inside the if-condition Extracts the assignments into separate line. Hex3468DigitsColor.java : Adds a message to result in case of failure only - Updates copyright date. Updates copyright date to 2023. - Updates copyright date. Updates copyright date to 2023. - Update imports Remove java.util.Pattern and add java.util.Map imports - ... and 45 more: https://git.openjdk.org/jdk/compare/f61499c7...3e92e1c4 ------------- Changes: https://git.openjdk.org/jdk/pull/9825/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=36 Stats: 661 lines in 4 files changed: 567 ins; 16 del; 78 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Mon Oct 9 23:24:35 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 9 Oct 2023 23:24:35 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: MissingColorNames.java : - Rename the color which doesn't belong to CSS-COLOR-4 specification. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/3e92e1c4..08c7c3fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=37 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=36-37 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Tue Oct 10 00:45:19 2023 From: duke at openjdk.org (ScientificWare) Date: Tue, 10 Oct 2023 00:45:19 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 23:24:35 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. [Hex3468DigitsColor.java](https://github.com/openjdk/jdk/pull/9825/files#diff-43de4f85478f7276a91e9f98358fa47f0dfb7a8747f85542be6648747be1a44d), this test is no longer useful. All tests are now included in [MissingColorNames.java](https://github.com/openjdk/jdk/pull/9825/files#diff-12985dbdaa06dfdab743b25c00ad8beb5f7139090cecec8c900bdcca4af74b17). I'll remove it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1754119597 From psadhukhan at openjdk.org Tue Oct 10 03:08:59 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 03:08:59 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 17:31:46 GMT, Andy Goryachev wrote: > in the mean time, do you know why the checks are consistently failing for this PR? No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1754266665 From jwaters at openjdk.org Tue Oct 10 03:32:08 2023 From: jwaters at openjdk.org (Julian Waters) Date: Tue, 10 Oct 2023 03:32:08 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v6] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Thu, 28 Sep 2023 03:12:03 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: > > - Merge branch 'openjdk:master' into patch-10 > - Merge branch 'master' into patch-10 > - Document changes in awt_DnDDS.cpp > - Remove negation in os_windows.cpp > - Mismatched declaration in D3DGlyphCache.cpp > - Fields in awt_TextComponent.cpp > - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp > - Qualifiers in awt_PrintDialog.h should be removed > - Likewise for awt_DnDDT.cpp > - awt_ole.h include order issue in awt_DnDDS.cpp > - ... and 16 more: https://git.openjdk.org/jdk/compare/84390dd0...1e2b39f9 Reopening - I will use this as the portion of the change for java.desktop and jdk.accessibility ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1754296794 From psadhukhan at openjdk.org Tue Oct 10 03:44:01 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 03:44:01 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v2] In-Reply-To: References: Message-ID: > A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog > Fix is to make sure the option pane dialog is always on top.... Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16060/files - new: https://git.openjdk.org/jdk/pull/16060/files/39fdb540..531207fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16060&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16060&range=00-01 Stats: 102 lines in 1 file changed: 102 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16060/head:pull/16060 PR: https://git.openjdk.org/jdk/pull/16060 From jwaters at openjdk.org Tue Oct 10 03:44:27 2023 From: jwaters at openjdk.org (Julian Waters) Date: Tue, 10 Oct 2023 03:44:27 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v7] In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. Julian Waters has updated the pull request incrementally with five additional commits since the last revision: - Revert sspi.cpp - Revert NativeCreds.c - Revert allocation.cpp - Revert symbolengine.cpp - Revert os_windows.cpp ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15096/files - new: https://git.openjdk.org/jdk/pull/15096/files/1e2b39f9..15ae2781 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=05-06 Stats: 238 lines in 5 files changed: 63 ins; 77 del; 98 mod Patch: https://git.openjdk.org/jdk/pull/15096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15096/head:pull/15096 PR: https://git.openjdk.org/jdk/pull/15096 From psadhukhan at openjdk.org Tue Oct 10 03:50:11 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 03:50:11 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3] In-Reply-To: References: Message-ID: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> > A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog > Fix is to make sure the option pane dialog is always on top.... Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16060/files - new: https://git.openjdk.org/jdk/pull/16060/files/531207fa..419c21b9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16060&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16060&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/16060.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16060/head:pull/16060 PR: https://git.openjdk.org/jdk/pull/16060 From psadhukhan at openjdk.org Tue Oct 10 03:50:11 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 03:50:11 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 16:46:36 GMT, Alisen Chung wrote: > Would it be better to check if the JFrame is "always on top" before making the JOptionPane also always on top? No..That's the issue this PR is trying to solve... If a frame is not "always on top" and is hidden by a frame which is "always on top", then the JOptionPane owned by former frame will hang the process as it is modal and will not allow events to go to latter or former frame.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1754307067 From tr at openjdk.org Tue Oct 10 04:35:57 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 10 Oct 2023 04:35:57 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3] In-Reply-To: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> References: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> Message-ID: On Tue, 10 Oct 2023 03:50:11 GMT, Prasanta Sadhukhan wrote: >> A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog >> Fix is to make sure the option pane dialog is always on top.... > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add test Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16060#pullrequestreview-1666112082 From psadhukhan at openjdk.org Tue Oct 10 06:05:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 06:05:40 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 05:10:18 GMT, Tejesh R wrote: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Can't we call `disableEvents ` in JFileChooser.updateUI() if JFileChooser is disabled instead of changing in all *UI classes? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1754444494 From tr at openjdk.org Tue Oct 10 06:25:21 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 10 Oct 2023 06:25:21 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 06:02:10 GMT, Prasanta Sadhukhan wrote: > Can't we call `disableEvents ` in JFileChooser.updateUI() if JFileChooser is disabled instead of changing in all *UI classes? Not sure, haven't tried it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1754480827 From tr at openjdk.org Tue Oct 10 06:42:09 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 10 Oct 2023 06:42:09 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: <9RViOxSUn0lPo80RYpAM0XkTldwWE_vdjlc2X_AyJLE=.33a31eb5-c190-423a-a4ad-17f98342ee2d@github.com> On Tue, 10 Oct 2023 06:22:29 GMT, Tejesh R wrote: > Can't we call `disableEvents ` in JFileChooser.updateUI() if JFileChooser is disabled instead of changing in all *UI classes? Also components disable is handled at UI classes (button, border etc), none of the places `disableEvents ` is used. So not sure if it can be used. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1754497778 From psadhukhan at openjdk.org Tue Oct 10 06:45:09 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 06:45:09 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 05:10:18 GMT, Tejesh R wrote: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. We call `enableEvents` in `JFileChooser.setup` so I guess we can call `disableEvents ` logically.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1754503787 From psadhukhan at openjdk.org Tue Oct 10 06:49:10 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 10 Oct 2023 06:49:10 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: <2WtTCZlFbWzAwoxaw0Fwx6BtUuxKMw8AVPdas3rvSI4=.ba360e9f-a05f-4a0b-910e-b1966366fd83@github.com> On Tue, 10 Oct 2023 03:06:04 GMT, Prasanta Sadhukhan wrote: > > in the mean time, do you know why the checks are consistently failing for this PR? > > No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) These actions seems to fail one or the other which does not seem to affect integration...for ex. https://github.com/openjdk/jdk/pull/16068 another action fail....many of earlier PRs also has one or more failure in these actions but never fail build/test after integration.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1754511422 From tr at openjdk.org Tue Oct 10 06:56:07 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 10 Oct 2023 06:56:07 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 06:42:23 GMT, Prasanta Sadhukhan wrote: > We call `enableEvents` in `JFileChooser.setup` so I guess we can call `disableEvents ` logically.. Ok, will work on it then. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1754527503 From clanger at openjdk.org Tue Oct 10 07:10:11 2023 From: clanger at openjdk.org (Christoph Langer) Date: Tue, 10 Oct 2023 07:10:11 GMT Subject: Integrated: 8317706: Exclude java/awt/Graphics2D/DrawString/RotTransText.java on linux In-Reply-To: <3nH9tJOKVBUNd151FLMxDLREQqITWGSt9ZIE6hFId7I=.fd9f7c0c-b247-4b7c-a2bc-273909a79cfb@github.com> References: <3nH9tJOKVBUNd151FLMxDLREQqITWGSt9ZIE6hFId7I=.fd9f7c0c-b247-4b7c-a2bc-273909a79cfb@github.com> Message-ID: On Sun, 8 Oct 2023 22:15:59 GMT, Christoph Langer wrote: > This test is failing on several Linux configurations (SLES 15), so it should be excluded. This pull request has now been integrated. Changeset: fcff222f Author: Christoph Langer URL: https://git.openjdk.org/jdk/commit/fcff222f9245df4c9ae42b55ef0ef202af969233 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8317706: Exclude java/awt/Graphics2D/DrawString/RotTransText.java on linux Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16096 From lbourges at openjdk.org Tue Oct 10 07:55:58 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Tue, 10 Oct 2023 07:55:58 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts @prrace could you review this simple fix for jdk22, thatcan be backported to 21 next ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1754614520 From alexey.ushakov at jetbrains.com Tue Oct 10 10:32:55 2023 From: alexey.ushakov at jetbrains.com (Alexey Ushakov) Date: Tue, 10 Oct 2023 12:32:55 +0200 Subject: Metal renderer threading issues [macOS] In-Reply-To: References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> Message-ID: <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> Hi, We actually changed this logic in JetBrains Runtime and invoke the CVD api only from one thread but still I see multiple display link threads on M2 machines in some rare cases. So it maybe OS related issue. Best Regards, Alexey > On Oct 9, 2023, at 9:27 PM, Philip Race wrote: > > I can't find any Apple docs saying anything like "invoke this only on the Appkit thread", > perhaps because you don't have to, but nor do I see any caution about using a consistent thread. > > The JDK code to start a thread is > - (void) startDisplayLink { > if (!CVDisplayLinkIsRunning(self.displayLink)) { > CVDisplayLinkStart(self.displayLink); > J2dTraceLn(J2D_TRACE_VERBOSE, "MTLLayer_startDisplayLink"); > } > displayLinkCount += KEEP_ALIVE_INC; // Keep alive displaylink counter > } > > and I can see how at least in theory two threads could be calling this code at the same time and > so start two threads. Although I'm a bit surprised if macOS doesn't detect this internally and > reject it and return an error. And we aren't checking for error returns, but in the case of an > error return, I'd really expect that to mean it did not start the thread. > > You could try enabling java2d logging to see if we at least have matching numbers of > calls to start & stop. But I can imagine that if we've overwritten a field holding is the display link thread reference > that CVDisplayLinkStop can't stop that leaked thread. > > A relatively simple experiment, that doesn't need JDK would be to just call CVDisplayLinkStart N times, > checking return value and then call CVDisplayLinkStop N times (again checking return value, > and at the end of it see how many threads are running. > > Probably that will tell us we do need to run all these calls on one of those 3 threads (AppKit, EDT, QueueFlusher), > although I'm not sure what implementation and performance consequences might ensue. > > You should file a bug with as much info as you can gather. > > -phil. > > On 10/8/23 6:52 AM, Alan Snyder wrote: >> I?ve been investigating a problem with a long running application that accumulates an apparently unbounded number of >> CVDisplayLink threads. I do not yet have an explanation or a test case. >> >> The code that creates and releases CVDisplayLinks looks fine, but that assumes there are no threading issues. >> It looks like there are threading issues. >> >> Specifically, it appears that the startDisplayLink and stopDisplayLink methods of the Objective-C class MTLLayer are invoked on multiple threads. >> >> They are invoked on the AppKit main thread from screen sleep notifications and blitTexture. >> >> They are invoked on the EDT from MTLLayer.validate. >> >> They are invoked on the Queue Flusher thread from MTLRenderQueue.flushBuffer. >> >> Perhaps someone familiar with this code could comment? >> > From tr at openjdk.org Tue Oct 10 11:20:53 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 10 Oct 2023 11:20:53 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: <_is7FSukPhGxb8j-rue2Nl7-YQ6b487pLf5Y7sy3a6s=.005dee9e-4bc3-4ee6-8986-736e138f3dda@github.com> On Tue, 10 Oct 2023 06:52:43 GMT, Tejesh R wrote: > We call `enableEvents` in `JFileChooser.setup` so I guess we can call `disableEvents ` logically.. `disableEvents ` not helpful in blocking the mouse events. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1755015068 From duke at openjdk.org Tue Oct 10 11:32:41 2023 From: duke at openjdk.org (Ravi Gupta) Date: Tue, 10 Oct 2023 11:32:41 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v4] In-Reply-To: References: Message-ID: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: 8316947: Review comments solved ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15961/files - new: https://git.openjdk.org/jdk/pull/15961/files/4a57de9b..e5e1818a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=02-03 Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15961.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15961/head:pull/15961 PR: https://git.openjdk.org/jdk/pull/15961 From aivanov at openjdk.org Tue Oct 10 11:39:53 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 10 Oct 2023 11:39:53 GMT Subject: RFR: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly [v4] In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 11:32:41 GMT, Ravi Gupta wrote: >> Write a test to check textArea triggers MouseEntered/MouseExited events properly >> >> MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. >> >> In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) >> >> Testing: >> Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. > > Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision: > > 8316947: Review comments solved Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15961#pullrequestreview-1667385865 From jdv at openjdk.org Tue Oct 10 12:11:47 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 10 Oct 2023 12:11:47 GMT Subject: RFR: 8316975: Memory leak in MTLSurfaceData Message-ID: <9KkU-1rr-GltvqfUjXyeSNkTBW1uQ_OFw8cMJ69r4GA=.91ba4116-2ab7-4561-844a-0df7de53103b@github.com> In MTLSurfaceData_initOps() we return if "(gc == NULL)" but we don't free already allocated "mtlsdo" using (MTLSDOps *)malloc(sizeof(MTLSDOps)) which is of 40 bytes. We need to free(mtlsdo) before we return from MTLSurfaceData_initOps() for any reasons. Moved (mtlsdo == NULL) check right after we allocate it and added logic to delete mtlsdo(40 bytes) at appropriate places. There is no regression test because to reproduce this issue we need to exhaust system memory. ------------- Commit messages: - 8316975: Memory leak in MTLSurfaceData Changes: https://git.openjdk.org/jdk/pull/16117/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16117&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316975 Stats: 12 lines in 1 file changed: 5 ins; 5 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16117.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16117/head:pull/16117 PR: https://git.openjdk.org/jdk/pull/16117 From javalists at cbfiddle.com Tue Oct 10 12:25:38 2023 From: javalists at cbfiddle.com (Alan Snyder) Date: Tue, 10 Oct 2023 05:25:38 -0700 Subject: Metal renderer threading issues [macOS] In-Reply-To: <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> Message-ID: <23E5D171-38A8-43D6-B5D0-88A75B240DAB@cbfiddle.com> I?m using an M2 mac also. > On Oct 10, 2023, at 3:32 AM, Alexey Ushakov wrote: > > We actually changed this logic in JetBrains Runtime and invoke the CVD api only from one thread but still I see multiple display link threads on M2 machines in some rare cases. So it maybe OS related issue. -------------- next part -------------- An HTML attachment was scrubbed... URL: From angorya at openjdk.org Tue Oct 10 14:47:00 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Tue, 10 Oct 2023 14:47:00 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 23:24:35 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1439: > 1437: > 1438: private static Map initColorNames() { > 1439: return Map.ofEntries( would it make more sense to use a switch statement instead of a static map? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352674434 From aivanov at openjdk.org Tue Oct 10 15:03:07 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 10 Oct 2023 15:03:07 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 23:24:35 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1: > 1: /* Does it make sense to separate color processing into a helper class? The `CSS` class is large enough, we can move parsing the colors to a package-private class, let's say `CSSColors`. The `CSS` class will use the static methods of that class. What do you think? src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1637: > 1635: } > 1636: } > 1637: else if (poundIndex < spaceIndex) { You're not changing code here, it's better to preserve the formatting. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 323: > 321: {"rgb(12 24 200)", "ff0c18c8"} > 322: }; > 323: } Please keep an empty line at the end of the files. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352429654 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352447626 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352757617 From aivanov at openjdk.org Tue Oct 10 15:07:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 10 Oct 2023 15:07:42 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 14:44:04 GMT, Andy Goryachev wrote: > would it make more sense to use a switch statement instead of a static map? I believe this was discussed somewhere? Looks like map provides better performance compared to `switch` statement. Fetching an element from a map gives a constant time, using a `switch` statement over strings would give a linear search time unless it's cleverly optimised by the compiler. @scientificware could point you to performance measurements, if there are ones. There were ones, if my memory serves me right. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352765240 From angorya at openjdk.org Tue Oct 10 15:14:26 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Tue, 10 Oct 2023 15:14:26 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 15:04:51 GMT, Alexey Ivanov wrote: >> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1439: >> >>> 1437: >>> 1438: private static Map initColorNames() { >>> 1439: return Map.ofEntries( >> >> would it make more sense to use a switch statement instead of a static map? > >> would it make more sense to use a switch statement instead of a static map? > > I believe this was discussed somewhere? Looks like map provides better performance compared to `switch` statement. Fetching an element from a map gives a constant time, using a `switch` statement over strings would give a linear search time unless it's cleverly optimised by the compiler. > > @scientificware could point you to performance measurements, if there are ones. There were ones, if my memory serves me right. 1. I believe the switch uses hash value so it's not linear anymore 2. most of the time these colors will not be needed just a suggestion, anyway ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1352773946 From honkar at openjdk.org Tue Oct 10 16:47:09 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 10 Oct 2023 16:47:09 GMT Subject: RFR: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 In-Reply-To: References: Message-ID: <1ltvSZOlXhjgD24PjXKHnLnSJCtux9GPtQqYnlfU9ks=.ef6a8231-0368-4786-a844-a26b21942917@github.com> On Tue, 3 Oct 2023 10:30:50 GMT, Alexander Zvegintsev wrote: > The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale. > > This changeset includes: > > * sun.java2d.uiScale value is now taken into account > * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system. > Now we take that into account and resize the image accordingly. > * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution. > * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported. > > Following tests are no longer failing on Wayland: > java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java > > Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling). Tested by applying the patch. The listed tests pass on single-monitor and dual virtual monitor setup on Ubuntu VM 22.04. Minor: Copyright year needs to be updated for the test file. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/16027#pullrequestreview-1668281329 From duke at openjdk.org Tue Oct 10 17:53:35 2023 From: duke at openjdk.org (lawrence.andrews) Date: Tue, 10 Oct 2023 17:53:35 GMT Subject: RFR: 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows Message-ID: ProblemListed ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows @prrace ------------- Commit messages: - 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows Changes: https://git.openjdk.org/jdk/pull/16106/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16106&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317751 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16106.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16106/head:pull/16106 PR: https://git.openjdk.org/jdk/pull/16106 From prr at openjdk.org Tue Oct 10 17:53:35 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 17:53:35 GMT Subject: RFR: 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 20:14:40 GMT, lawrence.andrews wrote: > ProblemListed ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows > > @prrace test/jdk/ProblemList.txt line 460: > 458: java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeForModalDialogTest/ConsumeForModalDialogTest.java 8317751 windows-all > 459: java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.java 8317751 windows-all > 460: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java 8317751 windows-all 8317751 is this bug id. You need to reference a DIFFERENT bug id for the problem listing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16106#discussion_r1353059852 From duke at openjdk.org Tue Oct 10 18:17:06 2023 From: duke at openjdk.org (lawrence.andrews) Date: Tue, 10 Oct 2023 18:17:06 GMT Subject: RFR: 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows [v2] In-Reply-To: References: Message-ID: > ProblemListed ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows > > @prrace lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Update ProblemList.txt Fixed the bug id ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16106/files - new: https://git.openjdk.org/jdk/pull/16106/files/efc85cf6..79228134 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16106&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16106&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16106.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16106/head:pull/16106 PR: https://git.openjdk.org/jdk/pull/16106 From prr at openjdk.org Tue Oct 10 18:43:33 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 18:43:33 GMT Subject: RFR: 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows [v2] In-Reply-To: References: Message-ID: <-cyumojUtmGjtoXOgwqKpbw1YbBBGn3z7pE5-KryquU=.f760c682-cd61-4832-b5b8-217ad804d413@github.com> On Tue, 10 Oct 2023 18:17:06 GMT, lawrence.andrews wrote: >> ProblemListed ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows >> >> @prrace > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update ProblemList.txt > > Fixed the bug id Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16106#pullrequestreview-1668585066 From prr at openjdk.org Tue Oct 10 20:10:25 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 20:10:25 GMT Subject: RFR: 8316975: Memory leak in MTLSurfaceData In-Reply-To: <9KkU-1rr-GltvqfUjXyeSNkTBW1uQ_OFw8cMJ69r4GA=.91ba4116-2ab7-4561-844a-0df7de53103b@github.com> References: <9KkU-1rr-GltvqfUjXyeSNkTBW1uQ_OFw8cMJ69r4GA=.91ba4116-2ab7-4561-844a-0df7de53103b@github.com> Message-ID: On Tue, 10 Oct 2023 12:03:23 GMT, Jayathirth D V wrote: > In MTLSurfaceData_initOps() we return if "(gc == NULL)" but we don't free already allocated "mtlsdo" using (MTLSDOps *)malloc(sizeof(MTLSDOps)) which is of 40 bytes. > > We need to free(mtlsdo) before we return from MTLSurfaceData_initOps() for any reasons. Moved (mtlsdo == NULL) check right after we allocate it and added logic to delete mtlsdo(40 bytes) at appropriate places. > > There is no regression test because to reproduce this issue we need to exhaust system memory. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16117#pullrequestreview-1668698858 From prr at openjdk.org Tue Oct 10 20:10:49 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 20:10:49 GMT Subject: RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager In-Reply-To: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> References: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> Message-ID: On Mon, 9 Oct 2023 05:17:58 GMT, Prasanta Sadhukhan wrote: > Issue is if one internal frame is open and maximized and another internal frame is created which is initialized with setMaximum(true) then after opening the second internal frame both internal frames are non-maximized > It can also be seen with SwingSet2 JInternalFrameDemo in WIndowsLookAndFeel i.e. when Frame 0 is maximised, and then Frame1 is maximised and then minimised, Frame0 should remain maximised but it is now unmaximised > > Issues seen with JInternalFrame in WindowsLookAndFeel are > - Frame 0 maximised > - Frame 4 maximised, when minimised, Frame0 is seen to be restored to normal size with Frame4 minimised > - Frame 0 is again maximised > - Frame 4 maximised from minimised, instead of maximising, it restores both Frame0 and Frame4 > > The fix makes sure the maximised internal frame remains maximised when the 2nd internal frame is maximised > This code seems to be added for [JDK-5036083](https://bugs.openjdk.org/browse/JDK-5036083) which expects > `When a frame is maximized and then minimized, the next frame should NOT be maximized.` > > It still honours that fix as the test mentioned in JDK-5036083 works as expected as mentioned above > > Also it is mentioned > https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java#L69-L70 > > It can be seen it is still honored. In SwingSet2 JInternalFrameDemo in WindowsL&F, if Frame0 is maximised and then Frame1 is activated/selected, it becomes maximised > Also, it doesn't cause any regression with our existing closed/open tests. src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java line 80: > 78: if (f.isMaximizable()) { > 79: if (!f.isMaximum()) { > 80: f.setMaximum(true); So if the new frame is set to maximum=true, don't you need to set the current frame to maximum=false ? The way I'm interpreting the class doc. and the comment about "transfer" is that only one frame can be in the maximised state. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16097#discussion_r1353226587 From prr at openjdk.org Tue Oct 10 20:11:46 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 20:11:46 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 05:10:18 GMT, Tejesh R wrote: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. src/java.desktop/share/classes/javax/swing/JFileChooser.java line 2082: > 2080: } > 2081: > 2082: @Override No javadoc .. are you hoping to get away without a CSR ? I think a CSR would be a good idea anyway because after 25 years of Swing ignoring this on a JFileChooser, you are going to support it. And if an app had set it and not realised then it'll see a change. So I'm not going to suggest javadoc but I am going to suggest a PR for compatibility concerns. Then there's always the option to back it out if there's an issue. src/java.desktop/share/classes/sun/swing/FilePane.java line 1957: > 1955: JComponent source = (JComponent)evt.getSource(); > 1956: > 1957: if(!source.isEnabled()) { if ( src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java line 374: > 372: viewMenuButton.addMouseListener(new MouseAdapter() { > 373: public void mousePressed(MouseEvent e) { > 374: if(!getFileChooser().isEnabled()) { if ( And since you aren't explicit about it, can you say what is the user experience of the native filechooser widget that's used .. isn't it still active ? Can you really disable it by ignoring these events ? src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java line 387: > 385: viewMenuButton.addKeyListener(new KeyAdapter() { > 386: public void keyPressed(KeyEvent e) { > 387: if(!getFileChooser().isEnabled()) { if ( ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1353260593 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1353257064 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1353257162 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1353257332 From angorya at openjdk.org Tue Oct 10 20:31:49 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Tue, 10 Oct 2023 20:31:49 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: <2WtTCZlFbWzAwoxaw0Fwx6BtUuxKMw8AVPdas3rvSI4=.ba360e9f-a05f-4a0b-910e-b1966366fd83@github.com> References: <2WtTCZlFbWzAwoxaw0Fwx6BtUuxKMw8AVPdas3rvSI4=.ba360e9f-a05f-4a0b-910e-b1966366fd83@github.com> Message-ID: On Tue, 10 Oct 2023 06:45:45 GMT, Prasanta Sadhukhan wrote: >>> in the mean time, do you know why the checks are consistently failing for this PR? >> >> No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR >> ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) > >> > in the mean time, do you know why the checks are consistently failing for this PR? >> >> No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) > > These actions seems to fail one or the other which does not seem to affect integration...for ex. https://github.com/openjdk/jdk/pull/16068 another action fail....many of earlier PRs also has one or more failure in these actions but never fail build/test after integration.. @prsadhuk could you please point me to a pre-built jdk with your fix? I am getting build errors - maybe because of git's autocrlf, but it's going to take too much time for me trying to resolve the issue. If I could download something already built it would be much easier. thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1756172268 From aivanov at openjdk.org Tue Oct 10 20:32:10 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 10 Oct 2023 20:32:10 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v38] In-Reply-To: References: Message-ID: <_JxdL6ilyfN9hFQGQhi_nwaL5NPV_XSh0wZBX-a8jww=.9a297732-4a92-47a3-8dfa-3d31cc967845@github.com> On Tue, 10 Oct 2023 15:11:24 GMT, Andy Goryachev wrote: >>> would it make more sense to use a switch statement instead of a static map? >> >> I believe this was discussed somewhere? Looks like map provides better performance compared to `switch` statement. Fetching an element from a map gives a constant time, using a `switch` statement over strings would give a linear search time unless it's cleverly optimised by the compiler. >> >> @scientificware could point you to performance measurements, if there are ones. There were ones, if my memory serves me right. > > 1. I believe the switch uses hash value so it's not linear anymore > 2. most of the time these colors will not be needed > > just a suggestion, anyway I agree. Perhaps, we should reconsider it again. The map takes up heap memory even if look up is done once, after the map is initialised, it's kept in memory forever. From this point of view, `switch` statement could be more efficient. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1353278202 From prr at openjdk.org Tue Oct 10 20:39:47 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 20:39:47 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 18:29:26 GMT, Alexey Ivanov wrote: >> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove declaration changes which are not required >> - suggested by djelinski > > src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h line 53: > >> 51: #define MITSHM_PERM_OWNER (0600) >> 52: >> 53: extern int XShmQueryExtension(Display* dpy); > > I wonder if it's even needed here: the declaration should come from `X11/extensions/XShm.h` which is included. I agree, but I wonder why it was ever added ? Near as I can tell its been there since the SHM code was added in 1.4 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1353307160 From prr at openjdk.org Tue Oct 10 21:03:13 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 21:03:13 GMT Subject: RFR: JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 03:24:36 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > I have added screen shot capturing facility to the test case and that will help for debugging in case of failure. Please review and let me know your suggestions or comments if any. > > Regards, > Renjith. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16067#pullrequestreview-1668985131 From prr at openjdk.org Tue Oct 10 21:15:27 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 21:15:27 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3] In-Reply-To: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> References: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> Message-ID: On Tue, 10 Oct 2023 03:50:11 GMT, Prasanta Sadhukhan wrote: >> A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog >> Fix is to make sure the option pane dialog is always on top.... > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add test This seems to me like an application bug. Apart from a couple of special cases - Popup being one of them - we don't use this call internally in dialogs etc. As much as possible determining the behaviours of these windows should be up to the app. I think this should be closed as not a (JDK) bug. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1756265973 From prr at openjdk.org Tue Oct 10 21:34:05 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 21:34:05 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts Let me submit a test task to verify. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1756285709 From prr at openjdk.org Tue Oct 10 21:37:59 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 21:37:59 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 19:35:33 GMT, Arik Hadas wrote: > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). Yes as Sergey noted that's a problem. Please just withdraw this PR. JetBrains have said they'll pick up doing the fix. The JBS bug ID can be re-used but not the PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1756301858 From prr at openjdk.org Tue Oct 10 22:04:00 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 22:04:00 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add So basically the code is out of order. A container listener is added which installs the property listeners but its all too late. The content was already added so the event is missed. The fix is simply to move the block that adds the content to after the listener is installed. Seems OK to me, but @kevinrushforth should test this. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15960#pullrequestreview-1669152806 From dnguyen at openjdk.org Tue Oct 10 22:16:36 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 10 Oct 2023 22:16:36 GMT Subject: RFR: JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 03:24:36 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > I have added screen shot capturing facility to the test case and that will help for debugging in case of failure. Please review and let me know your suggestions or comments if any. > > Regards, > Renjith. Looks good and safe to me. ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/16067#pullrequestreview-1669166884 From prr at openjdk.org Tue Oct 10 22:22:53 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 22:22:53 GMT Subject: RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v2] In-Reply-To: References: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> Message-ID: <24Vmk58qaqAly9WysnanQSKnCtd3sLNXU0jmWx_zV84=.25294e6d-eb62-4536-8c99-a0d45487127c@github.com> On Thu, 24 Aug 2023 07:46:07 GMT, Prasanta Sadhukhan wrote: >> javadoc contract for JComponent.setMinimumSize(Dimension) states: >> >> "Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value..." >> >> However, JScrollBar overrides getMinimumSize() and breaks this contract - it always returns a minimum size derived from the preferred size even if you have previously called setMinimumSize() >> >> Fix is made to check if mnimumSize is set and if so, honour it.. > > Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: > > - copyright year > - Fix maximumSize, test src/java.desktop/share/classes/javax/swing/JScrollBar.java line 765: > 763: if (isMinimumSizeSet()) { > 764: return super.getMinimumSize(); > 765: } This looks like it has potential to cause many compatibility problems. I think it better to simply update the Jscrollbar spec on these methods to reflect what JScrollbar does. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15325#discussion_r1353494090 From prr at openjdk.org Tue Oct 10 22:38:08 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 22:38:08 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v7] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 10 Oct 2023 03:44:27 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request incrementally with five additional commits since the last revision: > > - Revert sspi.cpp > - Revert NativeCreds.c > - Revert allocation.cpp > - Revert symbolengine.cpp > - Revert os_windows.cpp make/autoconf/flags-cflags.m4 line 566: > 564: # compilation of all source files regardless of the active code page on Windows. > 565: TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -permissive- -utf-8 -MP" > 566: TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -permissive- -utf-8 -Zc:wchar_t-" Now you are splitting it, surely you can't include this option until the very last PR ? I don't see those other PRs. Also the bug cat probably should now be "client-libs" .. I will update it .. and you'll need to create new linked bugs for the other PRs. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1353502377 From prr at openjdk.org Tue Oct 10 22:38:08 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 22:38:08 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v7] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 10 Oct 2023 22:32:54 GMT, Phil Race wrote: >> Julian Waters has updated the pull request incrementally with five additional commits since the last revision: >> >> - Revert sspi.cpp >> - Revert NativeCreds.c >> - Revert allocation.cpp >> - Revert symbolengine.cpp >> - Revert os_windows.cpp > > make/autoconf/flags-cflags.m4 line 566: > >> 564: # compilation of all source files regardless of the active code page on Windows. >> 565: TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -permissive- -utf-8 -MP" >> 566: TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -permissive- -utf-8 -Zc:wchar_t-" > > Now you are splitting it, surely you can't include this option until the very last PR ? > I don't see those other PRs. > Also the bug cat probably should now be "client-libs" .. I will update it .. and you'll need to create new > linked bugs for the other PRs. The bug title needed to change too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1353503647 From duke at openjdk.org Tue Oct 10 22:55:18 2023 From: duke at openjdk.org (lawrence.andrews) Date: Tue, 10 Oct 2023 22:55:18 GMT Subject: Integrated: 8317751 : ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows In-Reply-To: References: Message-ID: On Mon, 9 Oct 2023 20:14:40 GMT, lawrence.andrews wrote: > ProblemListed ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows > > @prrace This pull request has now been integrated. Changeset: f40ea510 Author: lawrence.andrews <87324768+lawrence-andrew at users.noreply.github.com> Committer: Phil Race URL: https://git.openjdk.org/jdk/commit/f40ea5109e4ea8a78aebdb90ce8eec3830096a9c Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8317751: ProblemList ConsumeForModalDialogTest.java, MenuItemActivatedTest.java & MouseModifiersUnitTest_Standard.java for windows Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/16106 From prr at openjdk.org Tue Oct 10 23:53:58 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 10 Oct 2023 23:53:58 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts Tests all passed. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16002#pullrequestreview-1669389492 From psadhukhan at openjdk.org Wed Oct 11 02:38:49 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 02:38:49 GMT Subject: RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager [v2] In-Reply-To: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> References: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> Message-ID: <4ATSwdCl8vzfI5WGPsJQ-Nnqt4AYPTTeBhy8xx9wqeA=.490fe616-dafd-4dda-a90b-bb5c8bd4cafe@github.com> > Issue is if one internal frame is open and maximized and another internal frame is created which is initialized with setMaximum(true) then after opening the second internal frame both internal frames are non-maximized > It can also be seen with SwingSet2 JInternalFrameDemo in WIndowsLookAndFeel i.e. when Frame 0 is maximised, and then Frame1 is maximised and then minimised, Frame0 should remain maximised but it is now unmaximised > > Issues seen with JInternalFrame in WindowsLookAndFeel are > - Frame 0 maximised > - Frame 4 maximised, when minimised, Frame0 is seen to be restored to normal size with Frame4 minimised > - Frame 0 is again maximised > - Frame 4 maximised from minimised, instead of maximising, it restores both Frame0 and Frame4 > > The fix makes sure the maximised internal frame remains maximised when the 2nd internal frame is maximised > This code seems to be added for [JDK-5036083](https://bugs.openjdk.org/browse/JDK-5036083) which expects > `When a frame is maximized and then minimized, the next frame should NOT be maximized.` > > It still honours that fix as the test mentioned in JDK-5036083 works as expected as mentioned above > > Also it is mentioned > https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java#L69-L70 > > It can be seen it is still honored. In SwingSet2 JInternalFrameDemo in WindowsL&F, if Frame0 is maximised and then Frame1 is activated/selected, it becomes maximised > Also, it doesn't cause any regression with our existing closed/open tests. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Restore current frame to maximise=false when another frame is maximised ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16097/files - new: https://git.openjdk.org/jdk/pull/16097/files/551bf763..51b331af Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16097&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16097&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16097.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16097/head:pull/16097 PR: https://git.openjdk.org/jdk/pull/16097 From psadhukhan at openjdk.org Wed Oct 11 02:43:00 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 02:43:00 GMT Subject: RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager [v2] In-Reply-To: References: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> Message-ID: On Tue, 10 Oct 2023 19:29:16 GMT, Phil Race wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Restore current frame to maximise=false when another frame is maximised > > src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java line 80: > >> 78: if (f.isMaximizable()) { >> 79: if (!f.isMaximum()) { >> 80: f.setMaximum(true); > > So if the new frame is set to maximum=true, don't you need to set the current frame to maximum=false ? > The way I'm interpreting the class doc. and the comment about "transfer" is that only one frame can be in the maximised state. I was interpreting it as transfer the attribute but retain it for current frame....but it seems your interpretation is more logical...so I have updated the PR.. Since I guess there's no JInternalFrame equivalent in native widget, it leaves scope for interpretation.. Now with this fix, in SwingSet2 JInternalFrame demo in WindowsL&F - If Frame 0 maximised, it goes to maximised state - Then when another frame say, Frame 4 maximised, Frame 4 is not restored to un-maximised size but actually been maximised and Frame0 is restored to un-maximised state.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16097#discussion_r1353892790 From psadhukhan at openjdk.org Wed Oct 11 03:11:58 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 03:11:58 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: <2WtTCZlFbWzAwoxaw0Fwx6BtUuxKMw8AVPdas3rvSI4=.ba360e9f-a05f-4a0b-910e-b1966366fd83@github.com> References: <2WtTCZlFbWzAwoxaw0Fwx6BtUuxKMw8AVPdas3rvSI4=.ba360e9f-a05f-4a0b-910e-b1966366fd83@github.com> Message-ID: On Tue, 10 Oct 2023 06:45:45 GMT, Prasanta Sadhukhan wrote: >>> in the mean time, do you know why the checks are consistently failing for this PR? >> >> No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR >> ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) > >> > in the mean time, do you know why the checks are consistently failing for this PR? >> >> No, this failure is in hotspot and it's ok to ignore this....nothing to do with the change in this PR ? [linux-x64 / test (hs/tier1 serviceability)](https://github.com/prsadhuk/jdk/actions/runs/6428672378/job/17457627583) > > These actions seems to fail one or the other which does not seem to affect integration...for ex. https://github.com/openjdk/jdk/pull/16068 another action fail....many of earlier PRs also has one or more failure in these actions but never fail build/test after integration.. > @prsadhuk could you please point me to a pre-built jdk with your fix? I am getting build errors - maybe because of git's autocrlf, but it's going to take too much time for me trying to resolve the issue. If I could download something already built it would be much easier. thanks! I have DM-ed you the pre-build jdk path ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1756696047 From jdv at openjdk.org Wed Oct 11 03:39:17 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 11 Oct 2023 03:39:17 GMT Subject: Integrated: 8316975: Memory leak in MTLSurfaceData In-Reply-To: <9KkU-1rr-GltvqfUjXyeSNkTBW1uQ_OFw8cMJ69r4GA=.91ba4116-2ab7-4561-844a-0df7de53103b@github.com> References: <9KkU-1rr-GltvqfUjXyeSNkTBW1uQ_OFw8cMJ69r4GA=.91ba4116-2ab7-4561-844a-0df7de53103b@github.com> Message-ID: On Tue, 10 Oct 2023 12:03:23 GMT, Jayathirth D V wrote: > In MTLSurfaceData_initOps() we return if "(gc == NULL)" but we don't free already allocated "mtlsdo" using (MTLSDOps *)malloc(sizeof(MTLSDOps)) which is of 40 bytes. > > We need to free(mtlsdo) before we return from MTLSurfaceData_initOps() for any reasons. Moved (mtlsdo == NULL) check right after we allocate it and added logic to delete mtlsdo(40 bytes) at appropriate places. > > There is no regression test because to reproduce this issue we need to exhaust system memory. This pull request has now been integrated. Changeset: 3aa4cba1 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/3aa4cba17520a488aa4a338a80f573af10d3e657 Stats: 12 lines in 1 file changed: 5 ins; 5 del; 2 mod 8316975: Memory leak in MTLSurfaceData Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/16117 From duke at openjdk.org Wed Oct 11 04:17:16 2023 From: duke at openjdk.org (ANUPAM DEV) Date: Wed, 11 Oct 2023 04:17:16 GMT Subject: RFR: 8317847: Typo in API documentation of class JPopupMenu Message-ID: Hello, I have fixed the typo in the comment for the method JPopupMenu.setInvoker(Component invoker) before: Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. after: Sets the invoker of this popup menu -- the component in which the popup menu is to be displayed. Please review the change. Regards, Anupam ------------- Commit messages: - 8317847: Typo in API documentation of class JPopupMenu - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge pull request #1 from anupamdev20/JDK-8255675 - 8255675: Typo in java.net.HttpURLConnection Changes: https://git.openjdk.org/jdk/pull/16133/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16133&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317847 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16133.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16133/head:pull/16133 PR: https://git.openjdk.org/jdk/pull/16133 From duke at openjdk.org Wed Oct 11 04:29:23 2023 From: duke at openjdk.org (ANUPAM DEV) Date: Wed, 11 Oct 2023 04:29:23 GMT Subject: RFR: 8317847: Typo in API documentation of class JPopupMenu In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 04:09:37 GMT, ANUPAM DEV wrote: > Hello, > > I have fixed the typo in the comment for the method JPopupMenu.setInvoker(Component invoker) > > before: Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. > after: Sets the invoker of this popup menu -- the component in which the popup menu is to be displayed. > > Please review the change. > > Regards, > Anupam The checks were failing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16133#issuecomment-1756760517 From duke at openjdk.org Wed Oct 11 04:29:23 2023 From: duke at openjdk.org (ANUPAM DEV) Date: Wed, 11 Oct 2023 04:29:23 GMT Subject: Withdrawn: 8317847: Typo in API documentation of class JPopupMenu In-Reply-To: References: Message-ID: <01N53cwpmsJfbycxPb6Jf0G2HH_e5Vytdt32SHitf4s=.4477322e-0f73-4ad2-94a8-0b1eb8cec130@github.com> On Wed, 11 Oct 2023 04:09:37 GMT, ANUPAM DEV wrote: > Hello, > > I have fixed the typo in the comment for the method JPopupMenu.setInvoker(Component invoker) > > before: Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. > after: Sets the invoker of this popup menu -- the component in which the popup menu is to be displayed. > > Please review the change. > > Regards, > Anupam This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/16133 From tr at openjdk.org Wed Oct 11 04:36:22 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 11 Oct 2023 04:36:22 GMT Subject: RFR: 4365952: Cannot disable JFileChooser In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 20:00:10 GMT, Phil Race wrote: >> Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. >> Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. > > src/java.desktop/share/classes/javax/swing/JFileChooser.java line 2082: > >> 2080: } >> 2081: >> 2082: @Override > > No javadoc .. are you hoping to get away without a CSR ? > I think a CSR would be a good idea anyway because after 25 years of Swing ignoring this > on a JFileChooser, you are going to support it. And if an app had set it and not realised then > it'll see a change. > So I'm not going to suggest javadoc but I am going to suggest a PR for compatibility concerns. > Then there's always the option to back it out if there's an issue. Sure, will raise a CSR for that. > src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java line 374: > >> 372: viewMenuButton.addMouseListener(new MouseAdapter() { >> 373: public void mousePressed(MouseEvent e) { >> 374: if(!getFileChooser().isEnabled()) { > > if ( > > And since you aren't explicit about it, can you say what is the user experience of the native filechooser widget that's used .. isn't it still active ? Can you really disable it by ignoring these events ? FileChooserDiabled This is how Filechooser looks when we disable every components by setting the state iteratively as done in JFileChooser class (Ignore the button at bottom, its for testing enable and disable state). Yet the event handling of filePane like mouse double click event, scroll event, pop-up events can still catch-up the events and process them (Couldn't find an option to disable whole filePane though). So ignoring these events along with disabled Look of UI seems to be a better option. So in short, when we disable FileChooser, all other individual components are inactive expect FilePane which looks inactive but processes some events which are ignored further. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1354038983 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1354037736 From duke at openjdk.org Wed Oct 11 05:11:04 2023 From: duke at openjdk.org (ANUPAM DEV) Date: Wed, 11 Oct 2023 05:11:04 GMT Subject: RFR: 8317847: Typo in API documentation of class JPopupMenu Message-ID: Hello, I have fixed the typo in the comment for the method JPopupMenu.setInvoker(Component invoker) before: Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. after: Sets the invoker of this popup menu -- the component in which the popup menu is to be displayed. Please review the change. Regards, Anupam ------------- Commit messages: - Updated comment for the method JPopupMenu.setInvoker(Component invoker) Changes: https://git.openjdk.org/jdk/pull/16135/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16135&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317847 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16135.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16135/head:pull/16135 PR: https://git.openjdk.org/jdk/pull/16135 From tr at openjdk.org Wed Oct 11 05:14:11 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 11 Oct 2023 05:14:11 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v2] In-Reply-To: References: Message-ID: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix - if spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16068/files - new: https://git.openjdk.org/jdk/pull/16068/files/17ee9d77..ea9a2ba7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=00-01 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From psadhukhan at openjdk.org Wed Oct 11 06:21:52 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 06:21:52 GMT Subject: RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v3] In-Reply-To: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> References: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> Message-ID: > javadoc contract for JComponent.setMinimumSize(Dimension) states: > > "Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value..." > > However, JScrollBar overrides getMinimumSize() and breaks this contract - it always returns a minimum size derived from the preferred size even if you have previously called setMinimumSize() > > Fix is made to check if mnimumSize is set and if so, honour it.. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Update spec ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15325/files - new: https://git.openjdk.org/jdk/pull/15325/files/be0a339b..9b96c335 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15325&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15325&range=01-02 Stats: 65 lines in 2 files changed: 6 ins; 59 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15325.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15325/head:pull/15325 PR: https://git.openjdk.org/jdk/pull/15325 From psadhukhan at openjdk.org Wed Oct 11 06:21:55 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 06:21:55 GMT Subject: RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v2] In-Reply-To: <24Vmk58qaqAly9WysnanQSKnCtd3sLNXU0jmWx_zV84=.25294e6d-eb62-4536-8c99-a0d45487127c@github.com> References: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> <24Vmk58qaqAly9WysnanQSKnCtd3sLNXU0jmWx_zV84=.25294e6d-eb62-4536-8c99-a0d45487127c@github.com> Message-ID: <2_FA_r7Nwc8NdWvYL4PYHf3dP4RBZBjGnR86JLE8rLo=.5bfda8d5-43c9-425e-aef6-af40e28a9571@github.com> On Tue, 10 Oct 2023 22:19:51 GMT, Phil Race wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: >> >> - copyright year >> - Fix maximumSize, test > > src/java.desktop/share/classes/javax/swing/JScrollBar.java line 765: > >> 763: if (isMinimumSizeSet()) { >> 764: return super.getMinimumSize(); >> 765: } > > This looks like it has potential to cause many compatibility problems. > I think it better to simply update the Jscrollbar spec on these methods to reflect what JScrollbar does. OK. Fair enough...Updated the spec of `getMinimumSize ` and `getMaximumSize` to mention this behaviour change as JScrollBar doesn't override `setMinimumSize` and `setMaximumSize` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15325#discussion_r1354147876 From psadhukhan at openjdk.org Wed Oct 11 06:36:15 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 11 Oct 2023 06:36:15 GMT Subject: RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v2] In-Reply-To: <2_FA_r7Nwc8NdWvYL4PYHf3dP4RBZBjGnR86JLE8rLo=.5bfda8d5-43c9-425e-aef6-af40e28a9571@github.com> References: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> <24Vmk58qaqAly9WysnanQSKnCtd3sLNXU0jmWx_zV84=.25294e6d-eb62-4536-8c99-a0d45487127c@github.com> <2_FA_r7Nwc8NdWvYL4PYHf3dP4RBZBjGnR86JLE8rLo=.5bfda8d5-43c9-425e-aef6-af40e28a9571@github.com> Message-ID: On Wed, 11 Oct 2023 06:13:48 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/classes/javax/swing/JScrollBar.java line 765: >> >>> 763: if (isMinimumSizeSet()) { >>> 764: return super.getMinimumSize(); >>> 765: } >> >> This looks like it has potential to cause many compatibility problems. >> I think it better to simply update the Jscrollbar spec on these methods to reflect what JScrollbar does. > > OK. Fair enough...Updated the spec of `getMinimumSize ` and `getMaximumSize` to mention this behaviour change as JScrollBar doesn't override `setMinimumSize` and `setMaximumSize` CSR added https://bugs.openjdk.org/browse/JDK-8317857 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15325#discussion_r1354194956 From duke at openjdk.org Wed Oct 11 08:06:22 2023 From: duke at openjdk.org (Andrey Starovoyt) Date: Wed, 11 Oct 2023 08:06:22 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: References: Message-ID: <9qYHBZxO3LUtecUF-PHeLb-Qk_8yxc1OSSjZVru3xNU=.75ae9e4b-b5a3-41d7-bebe-9687a7f53900@github.com> On Fri, 29 Sep 2023 19:35:33 GMT, Arik Hadas wrote: >> Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). This fix was also cherry-picked to muCommander and was verified on macOS 12.6.8 and macOs 13, on X86_64 and on M1. >> >> Reproducer/steps-to-verify: >> 1. Compile the following class: >> >> import java.awt.Toolkit; >> import java.awt.datatransfer.DataFlavor; >> import java.awt.datatransfer.Transferable; >> import java.awt.datatransfer.UnsupportedFlavorException; >> import java.io.IOException; >> import java.nio.file.Files; >> import java.nio.file.Path; >> import java.util.Arrays; >> >> public class Arik { >> >> public static void main(String[] args) throws IOException, UnsupportedFlavorException { >> System.out.println("copying a file to the clipboard2"); >> var path = Files.createTempFile(null, null); >> Files.writeString(path.toAbsolutePath(), "test"); >> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); >> try { >> Thread.sleep(Long.MAX_VALUE); >> } catch (InterruptedException e) { >> } >> } >> >> public static class MyTransferable implements Transferable { >> private Path path; >> >> MyTransferable(Path path) { >> this.path = path; >> } >> >> @Override >> public DataFlavor[] getTransferDataFlavors() { >> return new DataFlavor[] { DataFlavor.javaFileListFlavor }; >> } >> >> @Override >> public boolean isDataFlavorSupported(DataFlavor flavor) { >> return flavor.equals(DataFlavor.javaFileListFlavor); >> } >> >> @Override >> public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { >> return Arrays.asList(path.toFile()); >> } >> >> } >> } >> >> 2. Run the compiled class using current JRE (`java Arik`) >> 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: >> clipboard-before >> >> 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) >> 6. Run the compiled class using JRE that includes this change (`java Arik`) >> 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 8. Verify you see "Cliboard contents: file ... > > Arik Hadas has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 8314498: [macos] Transferring File objects to Finder fails > > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). > This fix was also cherry-picked to muCommander and was verified on macOS > 12.6.8 and macOs 13, on X86_64 and on M1. Hello! Actually, I don't like the fix: 1. It was the first time I touched Objective-C code, so the code itself is very poor. 2. I didn't add any tests because I am not familiar with the test framework. 3. At some point we received a number of exception reports related to my changes (most-likely), and I have no clue what was the reason. We did some investigation with @avu but unsuccessfully. So, my hope was that someone more experienced will handle the problem properly, but passed three years... @avu Can you help to handle submitting the PR from our side? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1757067973 From jkratochvil at openjdk.org Wed Oct 11 09:27:30 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Wed, 11 Oct 2023 09:27:30 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v4] In-Reply-To: References: Message-ID: > `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` > > While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. > > > src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > phost = (*g_network_address_get_hostname)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > pport = (*g_network_address_get_port)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_strfreev)(proxies); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_clear_error)(&error); > ^ > Compiling X11Renderer.c (for libawt_headless.so) > In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: > In file included from src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h:29: > src/java.desktop/unix/native/common/aw... Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: Remove the XShmQueryExtension declaration completely. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16092/files - new: https://git.openjdk.org/jdk/pull/16092/files/fa2c32e4..8e0d079c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16092&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16092.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16092/head:pull/16092 PR: https://git.openjdk.org/jdk/pull/16092 From jkratochvil at openjdk.org Wed Oct 11 09:27:33 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Wed, 11 Oct 2023 09:27:33 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v3] In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 20:37:07 GMT, Phil Race wrote: >> src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h line 53: >> >>> 51: #define MITSHM_PERM_OWNER (0600) >>> 52: >>> 53: extern int XShmQueryExtension(Display* dpy); >> >> I wonder if it's even needed here: the declaration should come from `X11/extensions/XShm.h` which is included. > > I agree, but I wonder why it was ever added ? Near as I can tell its been there since the SHM code was added in 1.4 So I have removed the declaration. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16092#discussion_r1354546381 From avu at openjdk.org Wed Oct 11 11:35:18 2023 From: avu at openjdk.org (Alexey Ushakov) Date: Wed, 11 Oct 2023 11:35:18 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: <9qYHBZxO3LUtecUF-PHeLb-Qk_8yxc1OSSjZVru3xNU=.75ae9e4b-b5a3-41d7-bebe-9687a7f53900@github.com> References: <9qYHBZxO3LUtecUF-PHeLb-Qk_8yxc1OSSjZVru3xNU=.75ae9e4b-b5a3-41d7-bebe-9687a7f53900@github.com> Message-ID: On Wed, 11 Oct 2023 08:00:27 GMT, Andrey Starovoyt wrote: >> Arik Hadas has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> 8314498: [macos] Transferring File objects to Finder fails >> >> Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). >> This fix was also cherry-picked to muCommander and was verified on macOS >> 12.6.8 and macOs 13, on X86_64 and on M1. > > Hello! Actually, I don't like the fix: > 1. It was the first time I touched Objective-C code, so the code itself is very poor. > 2. I didn't add any tests because I am not familiar with the test framework. > 3. At some point we received a number of exception reports related to my changes (most-likely), and I have no clue what was the reason. We did some investigation with @avu but unsuccessfully. > > So, my hope was that someone more experienced will handle the problem properly, but passed three years... > > @avu Can you help to handle submitting the PR from our side? @anstarovoyt thanks for the update. Yes, we'll handle it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1757481155 From duke at openjdk.org Wed Oct 11 12:20:18 2023 From: duke at openjdk.org (Arik Hadas) Date: Wed, 11 Oct 2023 12:20:18 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: References: <9qYHBZxO3LUtecUF-PHeLb-Qk_8yxc1OSSjZVru3xNU=.75ae9e4b-b5a3-41d7-bebe-9687a7f53900@github.com> Message-ID: On Wed, 11 Oct 2023 11:32:37 GMT, Alexey Ushakov wrote: >> Hello! Actually, I don't like the fix: >> 1. It was the first time I touched Objective-C code, so the code itself is very poor. >> 2. I didn't add any tests because I am not familiar with the test framework. >> 3. At some point we received a number of exception reports related to my changes (most-likely), and I have no clue what was the reason. We did some investigation with @avu but unsuccessfully. >> >> So, my hope was that someone more experienced will handle the problem properly, but passed three years... >> >> @avu Can you help to handle submitting the PR from our side? > > @anstarovoyt thanks for the update. Yes, we'll handle it. > 3. At some point we received a number of exception reports related to my changes (most-likely), and I have no clue what was the reason. We did some investigation with @avu but unsuccessfully. We also have an open issue in this state that seems related: https://github.com/mucommander/mucommander/issues/859 > @avu Can you help to handle submitting the PR from our side? This is a long standing issue in OpenJDK and when I reported it, the OpenJDK guys closed the issue without making a real effort to investigate it, so your help would certainly be appreciated! (even a partial fix like this one, currently this functionality doesn't work at all with OpenJDK). Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1757564813 From duke at openjdk.org Wed Oct 11 12:20:20 2023 From: duke at openjdk.org (Arik Hadas) Date: Wed, 11 Oct 2023 12:20:20 GMT Subject: Withdrawn: 8314498: [macos] Transferring File objects to Finder fails In-Reply-To: References: Message-ID: <5DzugV9qgDoBMDZKps_6tBHSHiI_65Bh-P3jcQlUNFU=.6f026891-bbf5-4b99-a910-4dd6fe6227b9@github.com> On Fri, 29 Sep 2023 09:27:42 GMT, Arik Hadas wrote: > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). This fix was also cherry-picked to muCommander and was verified on macOS 12.6.8 and macOs 13, on X86_64 and on M1. > > Reproducer/steps-to-verify: > 1. Compile the following class: > > import java.awt.Toolkit; > import java.awt.datatransfer.DataFlavor; > import java.awt.datatransfer.Transferable; > import java.awt.datatransfer.UnsupportedFlavorException; > import java.io.IOException; > import java.nio.file.Files; > import java.nio.file.Path; > import java.util.Arrays; > > public class Arik { > > public static void main(String[] args) throws IOException, UnsupportedFlavorException { > System.out.println("copying a file to the clipboard2"); > var path = Files.createTempFile(null, null); > Files.writeString(path.toAbsolutePath(), "test"); > Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); > try { > Thread.sleep(Long.MAX_VALUE); > } catch (InterruptedException e) { > } > } > > public static class MyTransferable implements Transferable { > private Path path; > > MyTransferable(Path path) { > this.path = path; > } > > @Override > public DataFlavor[] getTransferDataFlavors() { > return new DataFlavor[] { DataFlavor.javaFileListFlavor }; > } > > @Override > public boolean isDataFlavorSupported(DataFlavor flavor) { > return flavor.equals(DataFlavor.javaFileListFlavor); > } > > @Override > public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { > return Arrays.asList(path.toFile()); > } > > } > } > > 2. Run the compiled class using current JRE (`java Arik`) > 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) > 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: > clipboard-before > > 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) > 6. Run the compiled class using JRE that includes this change (`java Arik`) > 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) > 8. Verify you see "Cliboard contents: file URL / items" as in the following screenshot: > clipboard-after> Fix is to make sure the option pane dialog is always on top.... > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add test test/jdk/javax/swing/JOptionPane/TestJOptionPaneAlwaysOnTopBug.java line 95: > 93: } > 94: > 95: private static void centreFrame(JFrame myFrame) { Suggestion: private static void centreFrame(JFrame myFrame) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16060#discussion_r1355382728 From dcubed at openjdk.org Wed Oct 11 17:07:48 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Wed, 11 Oct 2023 17:07:48 GMT Subject: Integrated: 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 16:55:34 GMT, Daniel D. Daugherty wrote: > A trivial fix to merge two ProblemList entries for > java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java This pull request has now been integrated. Changeset: b92de54a Author: Daniel D. Daugherty URL: https://git.openjdk.org/jdk/commit/b92de54a81a4037a5396509d41de57323212639c Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/16154 From azvegint at openjdk.org Wed Oct 11 17:07:46 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 11 Oct 2023 17:07:46 GMT Subject: Integrated: 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 16:55:34 GMT, Daniel D. Daugherty wrote: > A trivial fix to merge two ProblemList entries for > java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16154#pullrequestreview-1671939064 From dcubed at openjdk.org Wed Oct 11 17:07:46 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Wed, 11 Oct 2023 17:07:46 GMT Subject: Integrated: 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 Message-ID: A trivial fix to merge two ProblemList entries for java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java ------------- Commit messages: - 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 Changes: https://git.openjdk.org/jdk/pull/16154/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16154&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317964 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16154.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16154/head:pull/16154 PR: https://git.openjdk.org/jdk/pull/16154 From dcubed at openjdk.org Wed Oct 11 17:07:47 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Wed, 11 Oct 2023 17:07:47 GMT Subject: Integrated: 8317964: java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java fails on macosx-all after JDK-8317751 In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 16:59:14 GMT, Alexander Zvegintsev wrote: >> A trivial fix to merge two ProblemList entries for >> java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java > > Marked as reviewed by azvegint (Reviewer). @azvegint - Thanks for the fast review! ------------- PR Comment: https://git.openjdk.org/jdk/pull/16154#issuecomment-1758115746 From alexey.ivanov at oracle.com Wed Oct 11 17:13:40 2023 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Wed, 11 Oct 2023 18:13:40 +0100 Subject: RFC: 8309726: Reader::readString In-Reply-To: <002801d9f9e9$5664e7d0$032eb770$@eu> References: <000001d99b8f$b6e1a4d0$24a4ee70$@eu> <002801d9f9e9$5664e7d0$032eb770$@eu> Message-ID: Hi Markus, I see. I didn't know there was a feature which automatically sends emails about submitted enhancements. It's the first time I see such an email. You changed the component from client-libs to core-libs in JDK-8309726, which is correct, but the email had already been sent. -- Regards, Alexey On 08/10/2023 14:14, Markus Karg wrote: > > Aleksei, > > thank you for reposting to the "right" mailing list, and everybody > thank you for contribution to this discussion, but please note that it > was *not me* who posted to the "wrong" list: In fact, I just opened > this issue https://bugs.openjdk.org/browse/JDK-8309726, and it was > *the OpenJDK infrastructure* which in turn posted to the "wrong" list. > I am not aware who is in charge to fix this, but *I* cannot change > this behvior. Maybe the one in charge is reading this and can fix it? > > Thanks > > -Markus > > *Von:*Aleksei Ivanov [mailto:alexey.ivanov at oracle.com] > *Gesendet:* Donnerstag, 5. Oktober 2023 14:16 > *An:* Markus Karg; core-libs > *Cc:* client-libs-dev at openjdk.org > *Betreff:* Re: RFC: 8309726: Reader::readString > > Hi Markus, > > You posted it to the wrong list, it belongs on core-libs-dev. > > -- > Regards, > Alexey > > On 10/06/2023 12:35, Markus Karg wrote: > > By analyzing several existing applications I noticed that many of > them need to read a String from an input source (be it an input > stream or a reader), and there are a lot of solutions applied > which all are more or less suboptimal: > > * Files.readString(Path) - Fast, convenient, uses > JLA.newStringNoRepl, only works with files (not with sockets or > other sources). > * new String(inputStream.readAllBytes()) - Fast, complex, enforces > dealing with an array in user code, cannot use JLA.newStringNoRepl. > * bufferedReader.lines().collect(StringBuilder::new, > StringBuilder::append, StringBuilder::append).toString(); - > Complex, enforces dealing with a stream in user code, doesn't use > JLA.newStringNoRepl. > * reader.transferTo(stringWriter); stringWriter.toString(); - > Medium convient, medium performance, synchronized as it relies on > StringBuffer instead of StringBuilder. > * Custom loop using char[] of various default sizes (some 8k, some > 16k, some configurable) - Slow, complex, doesn't use > JLA.newStringNoRepl. > * etc. > > Checking back with the particular authors of these applications I > noticed that what they all miss is (a) guidance which solution is > "best" (mostly thinking in speed, but also in reduced GC stress > and memory consumption), (b) something convenient like > Files.readString() but working with any reader implementation, not > just with files. > > I think we can do better, hence I'd like to propose the > introduction of a new Reader::readString method. The benefits are: > * Guidance. The introduction of this method is a clear signal to > all application programmers to use *this* one by default. > * Convenience. It couldn't be any easier for the caller. > * Performance. OpenJDK committers can optimize it for both, > convenience, speed, reduced GC stress, and memory consumption, at > the very same time. > * Optimizable. Each Reader implementation can choose an algorithm > fitting best its own needs, while java.io.Reader itself provides a > convenient default implementation based on a loop over this.read(). > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivanov at openjdk.org Wed Oct 11 17:31:23 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 11 Oct 2023 17:31:23 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Thu, 5 Oct 2023 16:29:26 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'origin' into desktop-exports > - Merge remote-tracking branch 'origin' into desktop-exports > - Make J2dTraceInit static > - Remove unnecessary exports src/java.desktop/share/native/libawt/java2d/SurfaceData.h line 557: > 555: */ > 556: SurfaceDataOps * > 557: SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData); ~~It seems to me none of the functions in `SurfaceData.h` should be exported. They all end up in `awt.dll` / `libawt.so`. I can't see any of these functions are accessed from other DLLs.~~ ~~Would you like to create a separate task for removing exports from `SurfaceData` functions?~~ Some are used from `fontmanager.dll`. But not as many as we export. Potentially all symbols exported from `awt.dll` except from `Java*` can be hidden? I found that `Disposer_AddRecord` and `J2dTraceImpl` are used from `lcms.dll`. src/java.desktop/share/native/libawt/java2d/Trace.c line 39: > 37: JNIEXPORT void JNICALL > 38: J2dTraceImpl(int level, jboolean cr, const char *string, ...) > 39: { `J2dTraceImpl` is used from `lcms.dll`, so it should remain exported. I thought it shouldn't be exported either. src/java.desktop/unix/native/libawt/awt/initIDs.c line 47: > 45: (JNIEnv *env, jclass clazz) > 46: { > 47: } Shall we remove `Color.initIDs`? Its implementation is now empty for all platforms. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1355356940 PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1355354455 PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1355437407 From aivanov at openjdk.org Wed Oct 11 17:39:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 11 Oct 2023 17:39:19 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Thu, 5 Oct 2023 16:29:26 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'origin' into desktop-exports > - Merge remote-tracking branch 'origin' into desktop-exports > - Make J2dTraceInit static > - Remove unnecessary exports > The method img_makePalette, currently located in share/native/libawt/awt/image/cvutils/img_colors.c, is only used by unix/native/common/awt/X11Color.c; it could be moved to the same directory to avoid exporting the method from libawt. The files img_colors.[ch] do not have any references to other files in cvutils. Isn't `X11Color.c` linked into `libawt`? I expect that it is. In this case, `img_makePalette` doesn't need to be exported, just declared in the header. > The methods Transform_GetInfo and Transform_transform are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. I don't know the history? If they're not used anywhere else, we can move them to where they're used and declare them static there. But I don't have a strong opinion here. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1758168753 From djelinski at openjdk.org Wed Oct 11 17:51:16 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 11 Oct 2023 17:51:16 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> On Wed, 11 Oct 2023 16:38:16 GMT, Alexey Ivanov wrote: >> Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: >> >> - Merge remote-tracking branch 'origin' into desktop-exports >> - Merge remote-tracking branch 'origin' into desktop-exports >> - Make J2dTraceInit static >> - Remove unnecessary exports > > src/java.desktop/share/native/libawt/java2d/SurfaceData.h line 557: > >> 555: */ >> 556: SurfaceDataOps * >> 557: SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData); > > ~~It seems to me none of the functions in `SurfaceData.h` should be exported. They all end up in `awt.dll` / `libawt.so`. I can't see any of these functions are accessed from other DLLs.~~ > > ~~Would you like to create a separate task for removing exports from `SurfaceData` functions?~~ > > Some are used from `fontmanager.dll`. But not as many as we export. > > Potentially all symbols exported from `awt.dll` except from `Java*` can be hidden? > I found that `Disposer_AddRecord` and `J2dTraceImpl` are used from `lcms.dll`. Keep in mind that on Linux libawt is split into libawt, libawt_headless and libawt_xawt, and the export/import dependencies are different. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1355472800 From djelinski at openjdk.org Wed Oct 11 17:58:39 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 11 Oct 2023 17:58:39 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Thu, 5 Oct 2023 16:29:26 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'origin' into desktop-exports > - Merge remote-tracking branch 'origin' into desktop-exports > - Make J2dTraceInit static > - Remove unnecessary exports `img_makePalette` is in libawt.so, `X11Color.c` is in libawt_xawt.so ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1758194836 From mikael at openjdk.org Wed Oct 11 18:23:09 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Wed, 11 Oct 2023 18:23:09 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 Message-ID: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. ------------- Commit messages: - macOS - Copyright year - Bump target macosx-x64 version to 11.00.00 Changes: https://git.openjdk.org/jdk/pull/16155/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317970 Stats: 18 lines in 3 files changed: 0 ins; 10 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/16155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16155/head:pull/16155 PR: https://git.openjdk.org/jdk/pull/16155 From erikj at openjdk.org Wed Oct 11 20:25:11 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 11 Oct 2023 20:25:11 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 17:49:14 GMT, Mikael Vidstedt wrote: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. I would like to get @prrace to look at this as well, just to make sure the metal stuff is correct. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16155#pullrequestreview-1672511677 From honkar at openjdk.org Wed Oct 11 21:10:23 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 11 Oct 2023 21:10:23 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 17:49:14 GMT, Mikael Vidstedt wrote: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. @prrace I noticed few deprecated constants being used in NSApplication.m #L336, #L360 such as https://developer.apple.com/documentation/appkit/nsappkitdefined. Now that macosx-x64 target version is being bumped to 11.x, do we change it before the update? NSEvent constants which were part of CocoaConstants.java file were changed as part of this [PR#13435.](https://github.com/openjdk/jdk/pull/13435) ------------- PR Comment: https://git.openjdk.org/jdk/pull/16155#issuecomment-1758540449 From prr at openjdk.org Wed Oct 11 21:10:25 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 11 Oct 2023 21:10:25 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v2] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 21:05:28 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with two additional commits since the last revision: > > - Update stale comment (again) > - Update stale comment make/modules/java.desktop/lib/Awt2dLibraries.gmk line 926: > 924: # pipeline only on macOS >=10.14. For macOS versions <10.14 even if > 925: # we enable Metal pipeline using -Dsun.java2d.metal=true, at > 926: # runtime we force it to use OpenGL pipeline. The comment is obsolete now, since the code that references 10.14 is now gone. it could be a puzzler to anyone reading it later as to how it could be supported on 10.14 when the JDK isn't. It probably should just be "Metal uses the same minimum version as the rest of the JDK" keeping the first sentence though. so in total MACOSX_METAL_VERSION_MIN specifies the lowest version of macOS that should be used to compile Metal shaders. Metal uses the same minimum version as the rest of the JDK ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16155#discussion_r1355775805 From mikael at openjdk.org Wed Oct 11 21:10:21 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Wed, 11 Oct 2023 21:10:21 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v2] In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. Mikael Vidstedt has updated the pull request incrementally with two additional commits since the last revision: - Update stale comment (again) - Update stale comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16155/files - new: https://git.openjdk.org/jdk/pull/16155/files/ce75188b..71334787 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=00-01 Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16155/head:pull/16155 PR: https://git.openjdk.org/jdk/pull/16155 From prr at openjdk.org Wed Oct 11 21:53:14 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 11 Oct 2023 21:53:14 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v2] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 21:10:21 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with two additional commits since the last revision: > > - Update stale comment (again) > - Update stale comment Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16155#pullrequestreview-1672654072 From prr at openjdk.org Wed Oct 11 21:53:14 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 11 Oct 2023 21:53:14 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v2] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: <077Hf6NYZwTBgATlhUDwjcRAbbnLYJV0llM7Mod_QcU=.c76870f8-dbb4-4c49-b992-3ae0852bc70c@github.com> On Wed, 11 Oct 2023 21:50:10 GMT, Phil Race wrote: >> Mikael Vidstedt has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update stale comment (again) >> - Update stale comment > > Marked as reviewed by prr (Reviewer). > @prrace I noticed few deprecated constants being used in NSApplication.m [#L336](https://github.com/openjdk/jdk/blob/b92de54a81a4037a5396509d41de57323212639c/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m#L336), [#L360](https://github.com/openjdk/jdk/blob/b92de54a81a4037a5396509d41de57323212639c/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m#L360) such as https://developer.apple.com/documentation/appkit/nsappkitdefined. > > Now that macosx-x64 target version is being bumped to 11.x, do we change it before the update? > > Previously few of the deprecated NSEvent constants which were part of CocoaConstants.java file were changed as part of this [PR#13435.](https://github.com/openjdk/jdk/pull/13435) Since 11.0 works fine for aarch64 I can't imagine its a problem for x64. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16155#issuecomment-1758597581 From azvegint at openjdk.org Wed Oct 11 22:20:16 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 11 Oct 2023 22:20:16 GMT Subject: RFR: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 [v2] In-Reply-To: References: Message-ID: > The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale. > > This changeset includes: > > * sun.java2d.uiScale value is now taken into account > * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system. > Now we take that into account and resize the image accordingly. > * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution. > * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported. > > Following tests are no longer failing on Wayland: > java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java > > Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling). Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: fix copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16027/files - new: https://git.openjdk.org/jdk/pull/16027/files/da786357..39662162 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16027&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16027&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16027.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16027/head:pull/16027 PR: https://git.openjdk.org/jdk/pull/16027 From azvegint at openjdk.org Wed Oct 11 22:20:18 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 11 Oct 2023 22:20:18 GMT Subject: Integrated: 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 In-Reply-To: References: Message-ID: On Tue, 3 Oct 2023 10:30:50 GMT, Alexander Zvegintsev wrote: > The current implementation of screen capture with ScreenCast has some shortcomings in handling ui scale. > > This changeset includes: > > * sun.java2d.uiScale value is now taken into account > * screen data streams from ScreenCast are provided in native screen resolution regardless of the scale set in the system. > Now we take that into account and resize the image accordingly. > * We are now trying all available `restore_token`, since it is is tied to the display, but not to its resolution. > * Skips the gtk2 part of the ScreenCaptureGtkTest as it is not supported. > > Following tests are no longer failing on Wayland: > java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java > java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java > > Other testing also looks good, including manual testing with various scales set in the system(including fractional scaling). This pull request has now been integrated. Changeset: 387896fb Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/387896fb349f341081c6075fb7169e9f3a0919cd Stats: 236 lines in 8 files changed: 168 ins; 48 del; 20 mod 8309621: [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1 Reviewed-by: prr, honkar ------------- PR: https://git.openjdk.org/jdk/pull/16027 From psadhukhan at openjdk.org Thu Oct 12 06:05:14 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 12 Oct 2023 06:05:14 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3] In-Reply-To: References: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> Message-ID: On Tue, 10 Oct 2023 21:11:28 GMT, Phil Race wrote: > This seems to me like an application bug. Apart from a couple of special cases - Popup being one of them - we don't use this call internally in dialogs etc. As much as possible determining the behaviours of these windows should be up to the app. I think this should be closed as not a (JDK) bug. I get your point but can we consider this as a "defensive" fix much like DiD fix that we do, in case application does't take care of it, so that we dont get this kind of hang situation...We have print dialog as always-on-top so we can consider this optionpane modal dialog also be the same... If any issues arise, we can always roll it back later on.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1758960857 From duke at openjdk.org Thu Oct 12 06:40:13 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Thu, 12 Oct 2023 06:40:13 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v15] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Added spaces around the assignment operator ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14898/files - new: https://git.openjdk.org/jdk/pull/14898/files/4fe5c79d..2365bf3d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=14 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14898&range=13-14 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14898.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14898/head:pull/14898 PR: https://git.openjdk.org/jdk/pull/14898 From kizune at openjdk.org Thu Oct 12 08:33:32 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 12 Oct 2023 08:33:32 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v8] In-Reply-To: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> References: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> Message-ID: On Tue, 26 Sep 2023 11:12:08 GMT, Abhishek Kumar wrote: >> The issue exist only for non-editable combobox and the root cause is accessible object is not created due to incorrect index returned from component class which results in no a11y API invoked. >> >> Proposed solution is to return the correct accessible child from getAccessibleChild method which is AquaComboBoxButton (arrowButton) instance and that results in invoking the a11y APIs to return the current selected item in combobox. >> >> Further when the application comes up first time the accessible name is not set for current displayed item in JCombobox that is handled in AquaComboBoxButton which will take care for the current selected item as well as if user modifies the selection by drop-down list. >> >> CI link is posted in JBS. > > Abhishek Kumar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision: > > - AccessibleName set in Listener > - Master > - Revert BasicComboBoxUI fix and update review comment > - bugid removed in comments > - Add condition to check JLabel instance > - set accessiblename to displayed text in JComboBox > - Merge > - Explicit frame dispose remove > - merge > - Review comment update > - ... and 1 more: https://git.openjdk.org/jdk/compare/555914d9...1a48076b src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 94: > 92: ac.setAccessibleName(String.valueOf(list.getModel() > 93: .getElementAt(0))); > 94: } So i see it updates accessible name whenever selection is changed. What about the initial value? Will the combobox initial value be displayed if it was never changed? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1356474711 From abhiscxk at openjdk.org Thu Oct 12 09:09:27 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 12 Oct 2023 09:09:27 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v8] In-Reply-To: References: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> Message-ID: On Thu, 12 Oct 2023 08:30:10 GMT, Alexander Zuev wrote: > What about the initial value? Will the combobox initial value be displayed if it was never changed? The initial value is set in `AquaComboBoxButton` constructor. Yes, initial value is displayed with screen magnifier even if it has never changed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1356520612 From lbourges at openjdk.org Thu Oct 12 09:18:12 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Thu, 12 Oct 2023 09:18:12 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 21:24:47 GMT, Phil Race wrote: >> For stroked shapes (no Renderer use), the min-join-error check is disabled. >> Added new jtreg test to verify join using pixel counts > > Let me submit a test task to verify. Thanks @prrace for approval. @kevinrushforth could you review this Marlin2D patch too as I want to backport it to openjdk 21 asap ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1759236460 From ae40515 at yahoo.com.tw Thu Oct 12 09:36:37 2023 From: ae40515 at yahoo.com.tw (Alec Su) Date: Thu, 12 Oct 2023 17:36:37 +0800 Subject: [NEW BUG]: Sending a SysexMessage starting with 0xF7 leads to JVM crash References: Message-ID: Hi, I've encountered a bug when sending MIDI SysexMessage. SysexMessage allows splitting a sysex message into multiple SysexMessage. The first SysexMessage will start with 0xF0. Other continuing SysexMessage will start with 0xF7. A SysexMessage starting with 0xF0 can be send by javax.sound.midi.Receiver normally. However, attempting to send a SysexMessage starting with 0xF7 results in a JVM crash. The code below is a example. It sends a dummy sysex message (F0 7D 01 02 03 04 05 06 F7) separately to all MIDI output devices. It requires at least one MIDI output device provided by OS, such as "Microsoft GS Wavetable Synth" in Windows or the "snd_virmidi" kernel module in Linux. import javax.sound.midi.*; public class SysexTest { public static void main(String[] args) { var deviceInfos = MidiSystem.getMidiDeviceInfo(); for (var info : deviceInfos) { try (MidiDevice device = MidiSystem.getMidiDevice(info)) { if (device.getMaxReceivers() != 0) { System.out.println("Open MIDI port: " + info.getName()); device.open(); Receiver receiver = device.getReceiver(); try { // Send (F0 7D 01 02), (03 04), (05 06 F7) separately receiver.send(new SysexMessage(new byte[]{(byte) 0xF0, 0x7D, 0x01, 0x02}, 4), -1); receiver.send(new SysexMessage(new byte[]{(byte) 0xF7, 0x03, 0x04}, 3), -1); receiver.send(new SysexMessage(new byte[]{(byte) 0xF7, 0x05, 0x06, (byte) 0xF7}, 4), -1); System.out.println("All SysexMessage sent"); } catch (InvalidMidiDataException e) { e.printStackTrace(); } } } catch (MidiUnavailableException e) { e.printStackTrace(); } } } } The main reason to cause the bug is that a pointer increased in https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/share/native/libjsound/MidiOutDevice.c#L137 After that, it attempted to release the modified pointer in https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/share/native/libjsound/MidiOutDevice.c#L143 I've created a patch to fix the bug and I'm planning to open a pull request. However, the bug is not yet reported on JDK Bug System. I need a sponsor to help me create the issue. The patch I made is here: https://github.com/AlecJY/jdk/commit/785c0c6ed7ebafaf50d424cfbca97cfc8a7467da This is my first time to contribute to OpenJDK. Please let me know if I've missed any essential steps. Thank you. Sincerely, Alec From rgupta at openjdk.org Thu Oct 12 09:43:29 2023 From: rgupta at openjdk.org (Ravi Gupta) Date: Thu, 12 Oct 2023 09:43:29 GMT Subject: Integrated: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly In-Reply-To: References: Message-ID: On Thu, 28 Sep 2023 11:18:16 GMT, Ravi Gupta wrote: > Write a test to check textArea triggers MouseEntered/MouseExited events properly > > MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. > > In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) > > Testing: > Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. This pull request has now been integrated. Changeset: 00ef9f9c Author: Ravi Gupta Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/00ef9f9c322dde236256953272d6906f6151635d Stats: 132 lines in 1 file changed: 132 ins; 0 del; 0 mod 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly Reviewed-by: tr, honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15961 From aivanov at openjdk.org Thu Oct 12 09:45:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 09:45:19 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v15] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 06:40:13 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Added spaces around the assignment operator Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14898#pullrequestreview-1673740110 From aivanov at openjdk.org Thu Oct 12 09:45:21 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 09:45:21 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v3] In-Reply-To: References: Message-ID: On Fri, 21 Jul 2023 03:35:57 GMT, Sergey Bylokhov wrote: >> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: >> >> Disabled OLE1 from CoInit > > Marked as reviewed by serb (Reviewer). @mrserb Could you take a look at the updated code, please? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1759280160 From aivanov at openjdk.org Thu Oct 12 09:57:17 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 09:57:17 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v6] In-Reply-To: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> References: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> Message-ID: On Tue, 1 Aug 2023 04:16:30 GMT, Renjith Kannath Pariyangad wrote: > Did further investigation on JDK-7116070 (name truncation issue) and found its [MS structure](https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/extended-capabilities-from-a-wdm-audio-driver) limitation, this structure can accommodate max 31 char only for _szPname_ . > > Workflow : **PLATFORM_API_WinOS_Ports.c** loading the description with the help of _mixerGetDevCapsW_ function and result will be stored into the [MIXERCAPSW](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-mixercapsw) structure and in this max size for _szPname_ is 31 char. In my analysis this is a limitation and we can't do anything more, let me know if you are aware any alternative solution for this. @Renjithkannath Please, add this evaluation to [JDK-7116070](https://bugs.openjdk.org/browse/JDK-7116070). The bug itself can be closed as *External*: we can do nothing about it, it's a limitation of Windows API. If Java migrates to a newer audio API, JDK-7116070 will be resolved. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1759297005 From aivanov at openjdk.org Thu Oct 12 09:58:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 09:58:15 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Wed, 11 Oct 2023 17:54:31 GMT, Daniel Jeli?ski wrote: > `img_makePalette` is in libawt.so, `X11Color.c` is in libawt_xawt.so I see. I didn't check Linux builds, but I should've. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1759299249 From aivanov at openjdk.org Thu Oct 12 10:03:20 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 10:03:20 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> Message-ID: On Wed, 11 Oct 2023 17:48:28 GMT, Daniel Jeli?ski wrote: >> src/java.desktop/share/native/libawt/java2d/SurfaceData.h line 557: >> >>> 555: */ >>> 556: SurfaceDataOps * >>> 557: SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData); >> >> ~~It seems to me none of the functions in `SurfaceData.h` should be exported. They all end up in `awt.dll` / `libawt.so`. I can't see any of these functions are accessed from other DLLs.~~ >> >> ~~Would you like to create a separate task for removing exports from `SurfaceData` functions?~~ >> >> Some are used from `fontmanager.dll`. But not as many as we export. >> >> Potentially all symbols exported from `awt.dll` except from `Java*` can be hidden? >> I found that `Disposer_AddRecord` and `J2dTraceImpl` are used from `lcms.dll`. > > Keep in mind that on Linux libawt is split into libawt, libawt_headless and libawt_xawt, and the export/import dependencies are different. I totally understand this. However, Windows specific symbols: 9 8 000380A0 GDIWinSD_InitDC 10 9 000385F0 GDIWindowSurfaceData_GetComp 11 A 000386C0 GDIWindowSurfaceData_GetOps 12 B 000386D0 GDIWindowSurfaceData_GetOpsNoSetup 13 C 000386E0 GDIWindowSurfaceData_GetWindow and others are still exported from `awt.dll`, I believe these can be made private. Yet I agree we need to be careful not to hide something that's used from other libraries. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1356588203 From ihse at openjdk.org Thu Oct 12 10:32:28 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 12 Oct 2023 10:32:28 GMT Subject: RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v7] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 10 Oct 2023 03:44:27 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request incrementally with five additional commits since the last revision: > > - Revert sspi.cpp > - Revert NativeCreds.c > - Revert allocation.cpp > - Revert symbolengine.cpp > - Revert os_windows.cpp This got a bit messy. In hindsight it would probably have been better to leave this closed and open a new bug. But what's done is done, let's not mess around any more at this point. If all other places where `permissive-` failed are fixed, then I think it is okay to include the flag in this PR. Otherwise, you cannot do that. As a general rule, changing compiler options is best done in a separate patch, to differentiate any potential bad effect from actual code changes. However, in this case, I don't think the flag will cause any differences in the generated code, only in what syntax the compiler accepts, so I guess it is fine. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1759347530 From ihse at openjdk.org Thu Oct 12 10:49:22 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 12 Oct 2023 10:49:22 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v2] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 21:10:21 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with two additional commits since the last revision: > > - Update stale comment (again) > - Update stale comment Other than that, it looks fine. Nice to be able to avoid platform-specific differences! make/modules/java.desktop/lib/Awt2dLibraries.gmk line 925: > 923: # should be used to compile Metal shaders. Metal uses the same minimum > 924: # version as the rest of the JDK. > 925: MACOSX_METAL_VERSION_MIN=$(MACOSX_VERSION_MIN) Actually, you can just inline `MACOSX_VERSION_MIN` in place; the only reason a separate variable was used was that it needed to take on different values depending on platform. ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16155#pullrequestreview-1673855439 PR Review Comment: https://git.openjdk.org/jdk/pull/16155#discussion_r1356636320 From kizune at openjdk.org Thu Oct 12 15:36:52 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 12 Oct 2023 15:36:52 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v8] In-Reply-To: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> References: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> Message-ID: On Tue, 26 Sep 2023 11:12:08 GMT, Abhishek Kumar wrote: >> The issue exist only for non-editable combobox and the root cause is accessible object is not created due to incorrect index returned from component class which results in no a11y API invoked. >> >> Proposed solution is to return the correct accessible child from getAccessibleChild method which is AquaComboBoxButton (arrowButton) instance and that results in invoking the a11y APIs to return the current selected item in combobox. >> >> Further when the application comes up first time the accessible name is not set for current displayed item in JCombobox that is handled in AquaComboBoxButton which will take care for the current selected item as well as if user modifies the selection by drop-down list. >> >> CI link is posted in JBS. > > Abhishek Kumar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision: > > - AccessibleName set in Listener > - Master > - Revert BasicComboBoxUI fix and update review comment > - bugid removed in comments > - Add condition to check JLabel instance > - set accessiblename to displayed text in JComboBox > - Merge > - Explicit frame dispose remove > - merge > - Review comment update > - ... and 1 more: https://git.openjdk.org/jdk/compare/0346af54...1a48076b Looks good now. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14497#pullrequestreview-1674502075 From alexsch at openjdk.org Thu Oct 12 15:47:18 2023 From: alexsch at openjdk.org (Alexander Scherbatiy) Date: Thu, 12 Oct 2023 15:47:18 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS Message-ID: The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well. - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): ?output-bin? attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document. - `CUPSPrinter.getOutputBins(String printer)` method uses PPD `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level. - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS. The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): - Printer settings, None - Inner tray, INNERTRAY - Separator tray, SEPARATORTRAY - Finisher (face-down), Main if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS. ------------- Commit messages: - 8318023: Implement IPP output-bin attribute extension on macOS Changes: https://git.openjdk.org/jdk/pull/16166/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318023 Stats: 719 lines in 9 files changed: 719 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16166.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16166/head:pull/16166 PR: https://git.openjdk.org/jdk/pull/16166 From alexsch at openjdk.org Thu Oct 12 16:00:30 2023 From: alexsch at openjdk.org (Alexander Scherbatiy) Date: Thu, 12 Oct 2023 16:00:30 GMT Subject: RFR: 7001133: OutOfMemoryError by CustomMediaSizeName implementation Message-ID: <7njRJbIWTvk2w-2CLDI0ZSlilGJ_6-5MFsTwWBUdjSo=.47858f3c-0d7e-4318-8c29-793293a6fac5@github.com> Each time `CUPSPrinter.initMedia()` method is called it creates new `CustomMediaSizeName` objects which are all collected in static `CustomMediaSizeName.customEnumTable` field. A lot of created duplicated `CustomMediaSizeName` objects wastes java heap space and can lead to `PrintService.getAttributes()` method call time degradation especially when a lot of different printers are installed in the operation system. The same is true for `CustomMediaTray` class. The fix adds a `create()` method and a hash map which allows to reuse created `CustomMediaSizeName/CustomMediaTray` objects. It seems that adding `equals(...)` method to `CustomMediaSizeName/CustomMediaTray` classes violates parent `Media` class contract which compares media objects only by `value` fields. The fix adds inner classes which are used as a key in corresponding hash maps. `test/jdk/javax/print` and `test/jdk/java/awt/print` automated tests were run to check the fix on Linux and macOS. ------------- Commit messages: - 7001133: OutOfMemoryError by CustomMediaSizeName implementation Changes: https://git.openjdk.org/jdk/pull/16167/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16167&range=00 Issue: https://bugs.openjdk.org/browse/JDK-7001133 Stats: 173 lines in 5 files changed: 153 ins; 13 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/16167.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16167/head:pull/16167 PR: https://git.openjdk.org/jdk/pull/16167 From angorya at openjdk.org Thu Oct 12 16:31:36 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 12 Oct 2023 16:31:36 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add so tested on windows 11 with your pre-built jdk and the latest fx master branch. What I see is some kind of behavior that happens when the code is missing repaint() and/or validate(). When the window comes up first, it looks like this - with the button not painted (a solid black block): ![Screenshot 2023-10-12 092011](https://github.com/openjdk/jdk/assets/107069028/8a8299de-96c2-438e-8252-8a1dba608149) a mouse over repaints the button (possibly due to hover?), or window resizing repaints the button. When I then click on the button, I see either 1/4 of the larger button where it is supposed to be, or at the corner, like so: ![Screenshot 2023-10-12 092024](https://github.com/openjdk/jdk/assets/107069028/1f970dd4-ef9b-4ed4-94bf-2cc57b519b87) resizing a window slightly places the button in the right spot and removes all the artifacts. All this happens on the primary screen with a 100% scale. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759959799 From aivanov at openjdk.org Thu Oct 12 16:32:29 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 16:32:29 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v8] In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 16:20:08 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove excess Marked as reviewed by aivanov (Reviewer). test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 103: > 101: !p.equals(endPoint) && !incorrectActionDetected; > 102: p.translate(sign(endPoint.x - p.x), > 103: sign(endPoint.y - p.y))) { Suggestion: p.translate(sign(endPoint.x - p.x), sign(endPoint.y - p.y))) { I'm probably the only one who prefers aligning wrapped lines? Doesn't it look better? ------------- PR Review: https://git.openjdk.org/jdk/pull/16018#pullrequestreview-1674614574 PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1357075634 From aivanov at openjdk.org Thu Oct 12 16:32:31 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 16:32:31 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3] In-Reply-To: <7NW3Y0GdVmLy4KuPA2_W71G8b6SFOXLnl3oOuobzKl8=.1fd477de-b04c-4c3d-b491-564d0da43b3f@github.com> References: <1tqdqjdTiemkHW1PGHI6Y6182-I30fJ7d2txUT9sxuc=.aeaff70b-1868-49e9-802c-4e94e62e9872@github.com> <_gAnX4o727a3n3xlrV2AJNmdzn2J1SpNXkqe_YjYuvI=.414b463d-38f4-488c-8572-8b2e99257481@github.com> <7NW3Y0GdVmLy4KuPA2_W71G8b6SFOXLnl3oOuobzKl8=.1fd477de-b04c-4c3d-b491-564d0da43b3f@github.com> Message-ID: On Thu, 5 Oct 2023 17:43:21 GMT, Damon Nguyen wrote: > However, since the accumulation of the changes doesn't seem to cause any failures anymore, should I just follow through with this PR? I can raise another bug if needed for this intermittent failure. Can't identify what's causing this though.. It could be that the increased timeout gives enough time for AWT to cleanup and it eventually exits. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1357077220 From psadhukhan at openjdk.org Thu Oct 12 16:34:06 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 12 Oct 2023 16:34:06 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: <5rliFSWaHEFkPR4RKs-wg5tqo6Y9abvYfzZT8qTrlFg=.1a8c2330-bd1b-4778-91cd-c187dc1a9852@github.com> On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add > so tested on windows 11 with your pre-built jdk and the latest fx master branch. > > What I see is some kind of behavior that happens when the code is missing repaint() and/or validate(). When the window comes up first, it looks like this - with the button not painted (a solid black block): > > ![Screenshot 2023-10-12 092011](https://user-images.githubusercontent.com/107069028/274665921-8a8299de-96c2-438e-8252-8a1dba608149.png) > > a mouse over repaints the button (possibly due to hover?), or window resizing repaints the button. > > When I then click on the button, I see either 1/4 of the larger button where it is supposed to be, or at the corner, like so: ![Screenshot 2023-10-12 092024](https://user-images.githubusercontent.com/107069028/274666390-1f970dd4-ef9b-4ed4-94bf-2cc57b519b87.png) > > resizing a window slightly places the button in the right spot and removes all the artifacts. > > All this happens on the primary screen with a 100% scale. Yes, known issue...please refer [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759964099 From angorya at openjdk.org Thu Oct 12 16:38:41 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 12 Oct 2023 16:38:41 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add Testing this on a secondary screen with a 175% scale: the button is painted, works right **most** of the time, but occasionally the button is not placed at the center, or is 1/4 painted, or disappears completely (until I resize the window). So, basically, it exhibits the same symptoms as on the primary screen. It is very inconsistent, the results vary between launches. ![Screenshot 2023-10-12 093109](https://github.com/openjdk/jdk/assets/107069028/46894edb-2e77-455f-a74c-66c94da9da1f) ![Screenshot 2023-10-12 093604](https://github.com/openjdk/jdk/assets/107069028/b225eeed-8938-4fd2-8fd4-a3055afa3616) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759971145 PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759973001 From angorya at openjdk.org Thu Oct 12 16:42:27 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 12 Oct 2023 16:42:27 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add just for fun, added button.getParent().validate(); button.getParent().repaint(); after button.setSize(buttonSize); with not much effect. Which makes me think the problem might be in the way the swing damage gets propagated to fx maybe? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759977842 From alexsch at openjdk.org Thu Oct 12 16:48:11 2023 From: alexsch at openjdk.org (Alexander Scherbatiy) Date: Thu, 12 Oct 2023 16:48:11 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS [v2] In-Reply-To: References: Message-ID: > The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well. > > - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): ?output-bin? attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document. > - `CUPSPrinter.getOutputBins(String printer)` method uses PPD `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level. > - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS. > > The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): > - Printer settings, None > - Inner tray, INNERTRAY > - Separator tray, SEPARATORTRAY > - Finisher (face-down), Main > > if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS. Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision: Remove System.out.printf(...) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16166/files - new: https://git.openjdk.org/jdk/pull/16166/files/e1fa32f8..847059e9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16166.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16166/head:pull/16166 PR: https://git.openjdk.org/jdk/pull/16166 From angorya at openjdk.org Thu Oct 12 16:53:45 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Thu, 12 Oct 2023 16:53:45 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add Assuming the issue we are seeing are due to JDK-8298796, the code changes look good to me. ------------- Marked as reviewed by angorya (no project role). PR Review: https://git.openjdk.org/jdk/pull/15960#pullrequestreview-1674677579 From aivanov at openjdk.org Thu Oct 12 17:20:20 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 17:20:20 GMT Subject: RFR: 8318028: Remove unused class="centered" from FocusCycle.svg Message-ID: <0tMofUYjjVSoLd9VRWG4B2gjD0jSkDGk470u-UG3srE=.6a8c8a82-1b5a-432d-a0d6-0d7f8b5b5f99@github.com> **Cleanup** A trivial modification which removes `class="centered"` from one of the `` elements. It's a remnant from a previous version of the image. Classes aren't used, all `` elements are centered. ------------- Commit messages: - 8318028: Remove unused class="centered" from FocusCycle.svg Changes: https://git.openjdk.org/jdk/pull/16168/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16168&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318028 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16168.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16168/head:pull/16168 PR: https://git.openjdk.org/jdk/pull/16168 From serb at openjdk.org Thu Oct 12 18:00:29 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 12 Oct 2023 18:00:29 GMT Subject: RFR: 8318028: Remove unused class="centered" from FocusCycle.svg In-Reply-To: <0tMofUYjjVSoLd9VRWG4B2gjD0jSkDGk470u-UG3srE=.6a8c8a82-1b5a-432d-a0d6-0d7f8b5b5f99@github.com> References: <0tMofUYjjVSoLd9VRWG4B2gjD0jSkDGk470u-UG3srE=.6a8c8a82-1b5a-432d-a0d6-0d7f8b5b5f99@github.com> Message-ID: On Thu, 12 Oct 2023 17:12:05 GMT, Alexey Ivanov wrote: > **Cleanup** > > A trivial modification which removes `class="centered"` from one of the `` elements. It's a remnant from a previous version of the image. > > Classes aren't used, all `` elements are centered. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16168#pullrequestreview-1674820488 From kizune at openjdk.org Thu Oct 12 18:02:42 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 12 Oct 2023 18:02:42 GMT Subject: RFR: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM Message-ID: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side. Also removing test from problem list as it should pass again now. ------------- Commit messages: - Rolling back additional unneeded changes - Removing some strange autocorrect in comments. - 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM Changes: https://git.openjdk.org/jdk/pull/16169/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16169&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8266242 Stats: 14 lines in 2 files changed: 11 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16169.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16169/head:pull/16169 PR: https://git.openjdk.org/jdk/pull/16169 From prr at openjdk.org Thu Oct 12 18:38:14 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 12 Oct 2023 18:38:14 GMT Subject: RFR: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM In-Reply-To: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> References: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> Message-ID: On Thu, 12 Oct 2023 17:54:07 GMT, Alexander Zuev wrote: > As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side. > > Also removing test from problem list as it should pass again now. Marked as reviewed by prr (Reviewer). src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m line 65: > 63: // Workaround for apple bug FB13261205, since it only affects arm based macs > 64: // and arm support started with macOS 11 ignore the workaround for previous versions > 65: if (@available(macOS 11, *)) { FYI there's a PR out to make macos 11 the minimum for JDK 22 https://github.com/openjdk/jdk/pull/16155, but this check would be needed in any backport. ------------- PR Review: https://git.openjdk.org/jdk/pull/16169#pullrequestreview-1674892814 PR Review Comment: https://git.openjdk.org/jdk/pull/16169#discussion_r1357241286 From azvegint at openjdk.org Thu Oct 12 18:52:12 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 12 Oct 2023 18:52:12 GMT Subject: RFR: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM In-Reply-To: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> References: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> Message-ID: On Thu, 12 Oct 2023 17:54:07 GMT, Alexander Zuev wrote: > As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side. > > Also removing test from problem list as it should pass again now. Marked as reviewed by azvegint (Reviewer). src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m line 38: > 36: #define DEFAULT_DEVICE_DPI 72 > 37: > 38: static NSInteger architecture = -1; This is optional, but since the `architecture` variable is only used in `isValidDisplayMode`, it can be declared [static](https://stackoverflow.com/a/4965145) inside the method itself. ------------- PR Review: https://git.openjdk.org/jdk/pull/16169#pullrequestreview-1674910801 PR Review Comment: https://git.openjdk.org/jdk/pull/16169#discussion_r1357251325 From duke at openjdk.org Thu Oct 12 20:10:24 2023 From: duke at openjdk.org (ANUPAM DEV) Date: Thu, 12 Oct 2023 20:10:24 GMT Subject: Integrated: 8317847: Typo in API documentation of class JPopupMenu In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 04:54:54 GMT, ANUPAM DEV wrote: > Hello, > > I have fixed the typo in the comment for the method JPopupMenu.setInvoker(Component invoker) > > before: Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. > after: Sets the invoker of this popup menu -- the component in which the popup menu is to be displayed. > > Please review the change. > > Regards, > Anupam This pull request has now been integrated. Changeset: 77fa44fd Author: ANUPAM DEV Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/77fa44fd4fefbc9ba41a2ed4bd931c326e5255e4 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8317847: Typo in API documentation of class JPopupMenu Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16135 From aivanov at openjdk.org Thu Oct 12 20:13:17 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 20:13:17 GMT Subject: RFR: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM In-Reply-To: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> References: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> Message-ID: On Thu, 12 Oct 2023 17:54:07 GMT, Alexander Zuev wrote: > As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side. > > Also removing test from problem list as it should pass again now. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16169#pullrequestreview-1675104051 From dnguyen at openjdk.org Thu Oct 12 20:13:49 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 12 Oct 2023 20:13:49 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v9] In-Reply-To: References: Message-ID: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Alignment fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16018/files - new: https://git.openjdk.org/jdk/pull/16018/files/f5a4f28f..d511ef41 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16018&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16018.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16018/head:pull/16018 PR: https://git.openjdk.org/jdk/pull/16018 From aivanov at openjdk.org Thu Oct 12 20:13:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 12 Oct 2023 20:13:49 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v9] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 20:07:18 GMT, Damon Nguyen wrote: >> This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Alignment fix Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16018#pullrequestreview-1675090907 From dnguyen at openjdk.org Thu Oct 12 22:05:33 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 12 Oct 2023 22:05:33 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v8] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 16:27:45 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove excess > > test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 103: > >> 101: !p.equals(endPoint) && !incorrectActionDetected; >> 102: p.translate(sign(endPoint.x - p.x), >> 103: sign(endPoint.y - p.y))) { > > Suggestion: > > p.translate(sign(endPoint.x - p.x), > sign(endPoint.y - p.y))) { > > I'm probably the only one who prefers aligning wrapped lines? Doesn't it look better? I agree, it does look neater. Unfortunately, my IDE doesn't default this (which makes sense) so I have to remember to do this when applicable. Thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1357479781 From dnguyen at openjdk.org Thu Oct 12 22:05:34 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 12 Oct 2023 22:05:34 GMT Subject: Integrated: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out In-Reply-To: References: Message-ID: <-SW7atNwEeA1D9cQuHZlrqLvKb5NYwjd0Zu8LqASmEY=.0370484c-5b5e-48e5-a93a-fded845d910c@github.com> On Mon, 2 Oct 2023 23:06:58 GMT, Damon Nguyen wrote: > This test intermittently fails by timeout. Increasing the timeout alone doesn't solve the failure as it still fails in about 400 runs. Adding another delay and reducing the delay amount to 1000ms. Now, the test passes after 2 sets of 500 repeats on all OS's without a timeout. This pull request has now been integrated. Changeset: 61ce739a Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/61ce739ac8453eaa0107241444c35c2f7e9c47dd Stats: 16 lines in 1 file changed: 4 ins; 4 del; 8 mod 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16018 From duke at openjdk.org Thu Oct 12 22:10:32 2023 From: duke at openjdk.org (ScientificWare) Date: Thu, 12 Oct 2023 22:10:32 GMT Subject: RFR: JDK-8294090 : Aligns the CSS and function behaviours [v3] In-Reply-To: References: Message-ID: <_UrscdYRVEH73c8mgQfy4GjMGVys-nStLw_6G1rYv5M=.31f106e3-1786-4a62-8c4f-fe1467d0062d@github.com> On Wed, 20 Sep 2023 19:54:01 GMT, Phil Race wrote: >> ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: >> >> - Merge branch 'scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours' of github.com:scientificware/jdk into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours >> - Merge branch 'openjdk:master' into scientificware-patch-004-CSS-aligns_rgb_and_rgba_function_behaviours >> - Merge master >> - RGBandRGBAalignmentBehaviours.java : >> - Change list name. >> - CSS.java : >> - Adds a comment about consecutive non space separators. >> - Adds e uppercase test. >> >> RGBandRGBAalignmentBehaviours.java : >> - Adds test cases with uppercase e. >> - Merge master >> - 8294090 : Corrects RGBandRGBAalignmentBehaviours.java file permission. >> - 8294090 : >> >> CSS.java : >> - Adds links to CSS-COLOR-4 and CSS-VALUE-4 specifications. >> - Update PARSE RGB method comments. >> - Adds base-ten exponent support. >> >> RGBandRGBAalignmentBehaviours.java : >> - Adds a set of tests for RGB functions. >> - Merge master >> >> # Conflicts: >> # src/java.desktop/share/classes/javax/swing/text/html/CSS.java >> - Am?lioration de la prise en charge des fonctions rgb et rgba concernant les couleurs. > > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1458: > >> 1456: * specifications. >> 1457: * By example rgb(rc gc bc), >> 1458: * rgb(rc,gc,bc), rgb(rc gc bc / ac), > > For many years javadoc has preferred {@code rgb(rc,gc,bc)} instead of .... > > Since this comment is being updated existing and new cases should be converted. Done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15262#discussion_r1357492118 From jwaters at openjdk.org Fri Oct 13 01:43:30 2023 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 13 Oct 2023 01:43:30 GMT Subject: RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v7] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 10 Oct 2023 03:44:27 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request incrementally with five additional commits since the last revision: > > - Revert sspi.cpp > - Revert NativeCreds.c > - Revert allocation.cpp > - Revert symbolengine.cpp > - Revert os_windows.cpp > This got a bit messy. In hindsight it would probably have been better to leave this closed and open a new bug. But what's done is done, let's not mess around any more at this point. > > If all other places where `permissive-` failed are fixed, then I think it is okay to include the flag in this PR. Otherwise, you cannot do that. As a general rule, changing compiler options is best done in a separate patch, to differentiate any potential bad effect from actual code changes. However, in this case, I don't think the flag will cause any differences in the generated code, only in what syntax the compiler accepts, so I guess it is fine. > > /reviewers 2 Sorry I was busy with work on my end, I'm not planning to integrate -permissive- in this Pull Request, I must have missed it. I'll remove it soon ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1760636258 From djelinski at openjdk.org Fri Oct 13 07:05:17 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 07:05:17 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> Message-ID: On Thu, 12 Oct 2023 10:00:15 GMT, Alexey Ivanov wrote: >> Keep in mind that on Linux libawt is split into libawt, libawt_headless and libawt_xawt, and the export/import dependencies are different. > > I totally understand this. However, Windows specific symbols: > > 9 8 000380A0 GDIWinSD_InitDC > 10 9 000385F0 GDIWindowSurfaceData_GetComp > 11 A 000386C0 GDIWindowSurfaceData_GetOps > 12 B 000386D0 GDIWindowSurfaceData_GetOpsNoSetup > 13 C 000386E0 GDIWindowSurfaceData_GetWindow > > and others are still exported from `awt.dll`, I believe these can be made private. > > Yet I agree we need to be careful not to hide something that's used from other libraries. Good point. I only checked the Linux exports/imports, will check the Windows-specific exports now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1357845707 From djelinski at openjdk.org Fri Oct 13 07:05:29 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 07:05:29 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Wed, 11 Oct 2023 17:28:07 GMT, Alexey Ivanov wrote: >> Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: >> >> - Merge remote-tracking branch 'origin' into desktop-exports >> - Merge remote-tracking branch 'origin' into desktop-exports >> - Make J2dTraceInit static >> - Remove unnecessary exports > > src/java.desktop/unix/native/libawt/awt/initIDs.c line 47: > >> 45: (JNIEnv *env, jclass clazz) >> 46: { >> 47: } > > Shall we remove `Color.initIDs`? Its implementation is now empty for all platforms. Sure, will do. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1357846668 From duke at openjdk.org Fri Oct 13 07:50:17 2023 From: duke at openjdk.org (ScientificWare) Date: Fri, 13 Oct 2023 07:50:17 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: - Merge master - CSS.java : - Update source code declaration in documentation comments and specifications. - Typo in an argument. - MissingColorNames.java : - Catches the Color Illegal Argument Exception and appends it to the result summary. - Uncomments rgb tests. - MissingColorNames.java : - Rename the color which doesn't belong to CSS-COLOR-4 specification. - Merge master - MissingColorNames.java : - Add a subset of RGB and RGBA tests. - MissingColorNames.java : - rename the list of string test. CSS.java : - correct a wrong index. - MissingColorNames.java : Adds a subset of hexadecimal tests. - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color # Conflicts: # src/java.desktop/share/classes/javax/swing/text/html/CSS.java - Merge master - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf ------------- Changes: https://git.openjdk.org/jdk/pull/9825/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=38 Stats: 759 lines in 4 files changed: 569 ins; 16 del; 174 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From djelinski at openjdk.org Fri Oct 13 07:53:22 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 07:53:22 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> Message-ID: <1krfOcxbylJm-JpUgovZgowmvjSao6zUOhDh1DmbGD8=.ee5aa5bc-2132-456c-9fa1-0cf9e4043c57@github.com> On Fri, 13 Oct 2023 07:01:08 GMT, Daniel Jeli?ski wrote: >> I totally understand this. However, Windows specific symbols: >> >> 9 8 000380A0 GDIWinSD_InitDC >> 10 9 000385F0 GDIWindowSurfaceData_GetComp >> 11 A 000386C0 GDIWindowSurfaceData_GetOps >> 12 B 000386D0 GDIWindowSurfaceData_GetOpsNoSetup >> 13 C 000386E0 GDIWindowSurfaceData_GetWindow >> >> and others are still exported from `awt.dll`, I believe these can be made private. >> >> Yet I agree we need to be careful not to hide something that's used from other libraries. > > Good point. I only checked the Linux exports/imports, will check the Windows-specific exports now. Wait a sec, these symbols are removed from the export list in this PR. Are you saying that you still see them? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1357891580 From duke at openjdk.org Fri Oct 13 08:36:42 2023 From: duke at openjdk.org (ScientificWare) Date: Fri, 13 Oct 2023 08:36:42 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 07:50:17 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: > > - Merge master > - CSS.java : > - Update source code declaration in documentation comments and specifications. > - Typo in an argument. > - MissingColorNames.java : > - Catches the Color Illegal Argument Exception and appends it to the result summary. > - Uncomments rgb tests. > - MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. > - Merge master > - MissingColorNames.java : > - Add a subset of RGB and RGBA tests. > - MissingColorNames.java : > - rename the list of string test. > > CSS.java : > - correct a wrong index. > - MissingColorNames.java : Adds a subset of hexadecimal tests. > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf Test output before the patch. Exception in thread "main" java.lang.RuntimeException: Failed. [aliceblue is not supported] [antiquewhite is not supported] [aquamarine is not supported] [azure is not supported] [beige is not supported] [bisque is not supported] [blanchedalmond is not supported] [blueviolet is not supported] [brown is not supported] [burlywood is not supported] [cadetblue is not supported] [chartreuse is not supported] [chocolate is not supported] [coral is not supported] [cornflowerblue is not supported] [cornsilk is not supported] [crimson is not supported] [cyan is not supported] [darkblue is not supported] [darkcyan is not supported] [darkgoldenrod is not supported] [darkgray is not supported] [darkgreen is not supported] [darkgrey is not supported] [darkkhaki is not supported] [darkmagenta is not supported] [darkolivegreen is not supported] [darkorange is not supported] [darkorchid is not supported] [darkred is not supported] [darksalmon is not supported] [darkseagreen is not supported] [darkslateblue is not supported] [darkslategray is not supported] [darkslategrey is not supported] [darkturquoise is not supported] [darkviolet is not supported] [deeppink is not supported] [deepskyblue is not supported] [dimgray is not supported] [dimgrey is not supported] [dodgerblue is not supported] [firebrick is not supported] [floralwhite is not supported] [forestgreen is not supported] [gainsboro is not supported] [ghostwhite is not supported] [gold is not supported] [goldenrod is not supported] [greenyellow is not supported] [grey is not supported] [honeydew is not supported] [hotpink is not supported] [indianred is not supported] [indigo is not supported] [ivory is not supported] [khaki is not supported] [lavender is not supported] [lavenderblush is not supported] [lawngreen is not supported] [lemonchiffon is not supported] [lightblue is not supported] [lightcoral is not supported] [lightcyan is not supported] [lightgoldenrodyellow is not supported] [lightgray is not supported] [lightgreen is not supported] [lightgrey is not supported] [lightpink is not supported] [lightsalmon is not supported] [lightseagreen is not supported] [lightskyblue is not supported] [lightslategray is not supported] [lightslategrey is not supported] [lightsteelblue is not supported] [lightyellow is not supported] [limegreen is not supported] [linen is not supported] [magenta is not supported] [mediumaquamarine is not supported] [mediumblue is not supported] [mediumorchid is not supported] [mediumpurple is not supported] [mediumseagreen is not supported] [mediumslateblue is not supported] [mediumspringgreen is not supported] [mediumturquoise is not supported] [mediumvioletred is not supported] [midnightblue is not supported] [mintcream is not supported] [mistyrose is not supported] [moccasin is not supported] [navajowhite is not supported] [oldlace is not supported] [olivedrab is not supported] -> [ orange wrong RGB code ] expected ffffa500, returned ffff8000 [orangered is not supported] [orchid is not supported] [palegoldenrod is not supported] [palegreen is not supported] [paleturquoise is not supported] [palevioletred is not supported] [papayawhip is not supported] [peachpuff is not supported] [peru is not supported] [pink is not supported] [plum is not supported] [powderblue is not supported] [rebeccapurple is not supported] [rosybrown is not supported] [royalblue is not supported] [saddlebrown is not supported] [salmon is not supported] [sandybrown is not supported] [seagreen is not supported] [seashell is not supported] [sienna is not supported] [skyblue is not supported] [slateblue is not supported] [slategray is not supported] [slategrey is not supported] [snow is not supported] [springgreen is not supported] [steelblue is not supported] [tan is not supported] [thistle is not supported] [tomato is not supported] [transparent is not supported] [turquoise is not supported] [violet is not supported] [wheat is not supported] [whitesmoke is not supported] [yellowgreen is not supported] [#f should return null] [#f0 should return null] -> [ #f12a wrong RGB code ] expected aaff1122, returned ff00f12a [#f0f10 should return null] [#f0f1092 should return null] -> [ #ff1122aa wrong RGB code ] expected aaff1122, returned ffff1122 -> [ #f0f10928 wrong RGB code ] expected 28f0f109, returned fff0f109 [f0f10928 is not supported] [#f0f109289 should return null] [ffffffff is not supported] -> [ rgb(12 24 200 / 82%) wrong RGB code ] expected d10c18c8, returned ff0c18c8 -> [ rgb(12 24 200 / 0.82) wrong RGB code ] expected d10c18c8, returned ff0c18c8 -> [ rgb(12 24 200 / -210) wrong RGB code ] expected 000c18c8, returned ff0c18c8 -> [ rgb(15% 60% 49%) wrong RGB code ] expected ff26997d, returned ff26997c -> [ rgb(15% 60% 49% / 82%) wrong RGB code ] expected d126997d, returned ff26997c -> [ rgb(15%, 60%, 49% / 82%) wrong RGB code ] expected d126997d, returned ff26997c -> [ rgb(0.14 60% 52.3 / 0.98) wrong RGB code ] expected fa009934, returned ff009934 -> [ rgb(none none none / none) wrong RGB code ] expected 00000000, returned ff000000 -> [ rgb(none none none/none) wrong RGB code ] expected 00000000, returned ff000000 -> [ rgb(none none 30) wrong RGB code ] expected ff00001e, returned ff1e0000 -> [ rgb(none 20 none) wrong RGB code ] expected ff001400, returned ff140000 -> [ rgb(10 50 13% / 50%) wrong RGB code ] expected 800a3221, returned ff0a3221 -> [ rgb(10 50 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(10 50,, 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(10 50 ,, 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(1.2e1 0.24e2 2e2) wrong RGB code ] expected ff0c18c8, returned ff010100 -> [ rgb(1200e-2 2400e-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgb(1200E-2 2400E-2 200000E-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgb(120560.64646464632469823160676064670646798706406464098706464097970906464067e-4 2400E-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgba(12 24 200) wrong RGB code ] expected ff0c18c8, returned c18c8 -> [ rgba(12 24 200%) wrong RGB code ] expected ff0c18ff, returned c18ff -> [ rgba(-1 24 200%) wrong RGB code ] expected ff0018ff, returned 18ff -> [ rgba(300 24 28) wrong RGB code ] expected ffff181c, returned ff181c +> [ rgba(12 24 200 / 82%) illegal argument ] d10c18c8 Color parameter outside of expected range: Alpha -> [ rgba(12, 24, 200) wrong RGB code ] expected ff0c18c8, returned c18c8 +> [ rgba(12, 24, 200, 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12, 24, 200 , 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12 , 24 , 200 , 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba( 12 , 24 , 200 , 210 ) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12 ,24, 200 ,210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12,24,200,210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha -> [ rgba(15% 60% 49%) wrong RGB code ] expected ff26997d, returned 26997d +> [ rgba(15% 60% 49% / 82%) illegal argument ] d126997d Color parameter outside of expected range: Alpha +> [ rgba(15%, 60%, 49% / 82%) illegal argument ] d126997d Color parameter outside of expected range: Alpha -> [ rgba(none none none) wrong RGB code ] expected ff000000, returned 0 -> [ rgba(none none 30) wrong RGB code ] expected ff00001e, returned 1e0000 -> [ rgba(none 20 none) wrong RGB code ] expected ff001400, returned 140000 -> [ rgba(10 none none) wrong RGB code ] expected ff0a0000, returned a0000 -> [ rgba(none none none) wrong RGB code ] expected ff000000, returned 0 +> [ rgba(10 50 13% / 50%) illegal argument ] 800a3221 Color parameter outside of expected range: Alpha +> [ rgba(10 50 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(10 50,, 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(10 50 ,, 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(1.2e1 0.24e2 2e2) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha -> [ rgba(1200e-2 2400e-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ff00ff -> [ rgba(1200E-2 2400E-2 200000E-3) wrong RGB code ] expected ff0c18c8, returned ff00ff -> [ rgba(120560.64646464632469823160676064670646798706406464098706464097970906464067e-4 2400E-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ff00ff at MissingColorNames.main(MissingColorNames.java:67) ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1761129993 From duke at openjdk.org Fri Oct 13 10:03:25 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 13 Oct 2023 10:03:25 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v6] In-Reply-To: References: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> Message-ID: On Thu, 12 Oct 2023 09:53:55 GMT, Alexey Ivanov wrote: >> Did further investigation on JDK-7116070 (name truncation issue) and found its [MS structure](https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/extended-capabilities-from-a-wdm-audio-driver) limitation, this structure can accommodate max 31 char only for _szPname_ . >> >> Workflow : >> **PLATFORM_API_WinOS_Ports.c** loading the description with the help of _mixerGetDevCapsW_ function and result will be stored into the [MIXERCAPSW](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-mixercapsw) structure and in this max size for _szPname_ is 31 char. >> In my analysis this is a limitation and we can't do anything more, let me know if you are aware any alternative solution for this. > >> Did further investigation on JDK-7116070 (name truncation issue) and found its [MS structure](https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/extended-capabilities-from-a-wdm-audio-driver) limitation, this structure can accommodate max 31 char only for _szPname_ . >> >> Workflow : **PLATFORM_API_WinOS_Ports.c** loading the description with the help of _mixerGetDevCapsW_ function and result will be stored into the [MIXERCAPSW](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-mixercapsw) structure and in this max size for _szPname_ is 31 char. In my analysis this is a limitation and we can't do anything more, let me know if you are aware any alternative solution for this. > > @Renjithkannath Please, add this evaluation to [JDK-7116070](https://bugs.openjdk.org/browse/JDK-7116070). The bug itself can be closed as *External*: we can do nothing about it, it's a limitation of Windows API. > > If Java migrates to a newer audio API, JDK-7116070 will be resolved. Thanks @aivanov-jdk, I have closed JDK-7116070 marked as _External_ by adding evaluation into comment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1761250669 From psadhukhan at openjdk.org Fri Oct 13 11:11:13 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 13 Oct 2023 11:11:13 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: <5rliFSWaHEFkPR4RKs-wg5tqo6Y9abvYfzZT8qTrlFg=.1a8c2330-bd1b-4778-91cd-c187dc1a9852@github.com> References: <5rliFSWaHEFkPR4RKs-wg5tqo6Y9abvYfzZT8qTrlFg=.1a8c2330-bd1b-4778-91cd-c187dc1a9852@github.com> Message-ID: On Thu, 12 Oct 2023 16:31:38 GMT, Prasanta Sadhukhan wrote: > Yes, known issue...please refer [JDK-8298796](https://bugs.openjdk.org/browse/JDK-8298796) As already mentioned above, this are known issues and not caused by this PR.. This issues will be investigated as part of that JBS... ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759980085 From angorya at openjdk.org Fri Oct 13 11:11:14 2023 From: angorya at openjdk.org (Andy Goryachev) Date: Fri, 13 Oct 2023 11:11:14 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add yes; i can see how JDK-8298796 might affect the initial state, but the issue seems to go beyond initial state. updating the preferred size is not working reliably - so perhaps it is JDK-8298796 or perhaps it is some other issue? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15960#issuecomment-1759982051 From lbourges at openjdk.org Fri Oct 13 12:05:27 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Fri, 13 Oct 2023 12:05:27 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts @johanvos could you review this fix? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1761352458 From djelinski at openjdk.org Fri Oct 13 12:21:24 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 12:21:24 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v4] In-Reply-To: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: > Please review this patch that removes a number of unused exports from java.desktop native libraries. > > In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: > - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. > - removed `colorValueID` in X11Color; that field was not used. > - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. > > The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. > > The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. > > Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision: - Update copyright - hide awt_mlib.h symbols on Windows - Hide more GrPrim functions - Merge remote-tracking branch 'origin' into desktop-exports - Remove TextField_initIDs - Remove FileDialog_initIDs - Remove Button_initIDs - Remove Rectangle_initIDs - Remove KeyboardFocusManager_initIDs - Remove Color_initIDs - ... and 4 more: https://git.openjdk.org/jdk/compare/18375b4b...5808c65e ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13261/files - new: https://git.openjdk.org/jdk/pull/13261/files/beb0add8..5808c65e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=02-03 Stats: 13427 lines in 487 files changed: 7578 ins; 3574 del; 2275 mod Patch: https://git.openjdk.org/jdk/pull/13261.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13261/head:pull/13261 PR: https://git.openjdk.org/jdk/pull/13261 From djelinski at openjdk.org Fri Oct 13 12:21:51 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 12:21:51 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Thu, 5 Oct 2023 16:29:26 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Merge remote-tracking branch 'origin' into desktop-exports > - Merge remote-tracking branch 'origin' into desktop-exports > - Make J2dTraceInit static > - Remove unnecessary exports I checked the list of Windows-specific exports; I found and removed a few more. Mach5 tests still pass on all platforms. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1761347755 From djelinski at openjdk.org Fri Oct 13 12:22:17 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 12:22:17 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Fri, 13 Oct 2023 07:02:16 GMT, Daniel Jeli?ski wrote: >> src/java.desktop/unix/native/libawt/awt/initIDs.c line 47: >> >>> 45: (JNIEnv *env, jclass clazz) >>> 46: { >>> 47: } >> >> Shall we remove `Color.initIDs`? Its implementation is now empty for all platforms. > > Sure, will do. Found and removed a few more initIDs methods that were empty on all platforms. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358127289 From abhiscxk at openjdk.org Fri Oct 13 12:26:47 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 13 Oct 2023 12:26:47 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v2] In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 05:14:11 GMT, Tejesh R wrote: >> Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. >> Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix - if spacing test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 50: > 48: */ > 49: public class FileChooserDisableTest { > 50: static Robot robot; Can be a local variable in `main`. test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 73: > 71: Dimension btnSize = desktopBtn[0].getSize(); > 72: robot.mouseMove(movePoint.x + btnSize.width / 2, movePoint.y + btnSize.height / 2); > 73: robot.delay(2000); Do we need such large delays ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1358184728 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1358184227 From aivanov at openjdk.org Fri Oct 13 13:43:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 13:43:19 GMT Subject: Integrated: 8318028: Remove unused class="centered" from FocusCycle.svg In-Reply-To: <0tMofUYjjVSoLd9VRWG4B2gjD0jSkDGk470u-UG3srE=.6a8c8a82-1b5a-432d-a0d6-0d7f8b5b5f99@github.com> References: <0tMofUYjjVSoLd9VRWG4B2gjD0jSkDGk470u-UG3srE=.6a8c8a82-1b5a-432d-a0d6-0d7f8b5b5f99@github.com> Message-ID: On Thu, 12 Oct 2023 17:12:05 GMT, Alexey Ivanov wrote: > **Cleanup** > > A trivial modification which removes `class="centered"` from one of the `` elements. It's a remnant from a previous version of the image. > > Classes aren't used, all `` elements are centered. This pull request has now been integrated. Changeset: 7d31146f Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/7d31146f4d4ec81728c591d839ee2bb942e5e5fa Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8318028: Remove unused class="centered" from FocusCycle.svg Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/16168 From duke at openjdk.org Fri Oct 13 14:30:09 2023 From: duke at openjdk.org (Karl T) Date: Fri, 13 Oct 2023 14:30:09 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v4] In-Reply-To: References: Message-ID: On Tue, 10 May 2022 19:03:23 GMT, Damon Nguyen wrote: >> The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. >> >> The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Added string buffer. Separated fail images. Changed exception to throw at the end of test. This PR breaks correct text location when using HTML text in buttons. It works only if horizontal/vertical alignment is center and if using symmetric margin (top == bottom and left == right). If using left/right alignment or using asymmetric margin (e.g. top=30, bottom=4) then the HTML text location is wrong. And shouldn't text positioned the same for HTML and non-HTML buttons? Screenshot that demonstrates the problem. Left is made with Java 20, right with Java 17. Red arrows mark wrong text locations. In Java 17, HTML text is painted at same location as non-HTML text. Since Java 19, there is a huge difference because margin is simply ignored when painting. (interestingly margin is still used to compute preferred size ? ) ![image](https://github.com/openjdk/jdk/assets/5604048/46cd2d67-e0d5-4176-b7df-08b5ac854a43) Code used to create above screenshots: ~~~java import java.awt.*; import javax.swing.*; import javax.swing.border.*; public class HtmlButtonTest { public static void main( String[] args ) { SwingUtilities.invokeLater( () -> { JFrame frame = new JFrame( "HTML Button Test" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); JPanel panel = new JPanel( new GridBagLayout() ); panel.setBorder( new EmptyBorder( 20, 20, 20, 20 ) ); createButtons( panel, "center", SwingConstants.CENTER, SwingConstants.CENTER, null ); createButtons( panel, "left", SwingConstants.LEFT, SwingConstants.CENTER, null ); createButtons( panel, "right", SwingConstants.RIGHT, SwingConstants.CENTER, null ); createButtons( panel, "center with margin 30,4,4,4", SwingConstants.CENTER, SwingConstants.CENTER, new Insets( 30, 4, 4, 4 ) ); createButtons( panel, "left with margin 30,4,4,4", SwingConstants.LEFT, SwingConstants.CENTER, new Insets( 30, 4, 4, 4 ) ); createButtons( panel, "left/top with margin 30,4,4,4", SwingConstants.LEFT, SwingConstants.TOP, new Insets( 30, 4, 4, 4 ) ); frame.add( new JLabel( "Java version " + System.getProperty( "java.version" ) ), BorderLayout.NORTH ); frame.add( panel ); frame.pack(); frame.setVisible( true ); } ); } private static void createButtons( JPanel panel, String text, int horizontalAlignment, int verticalAlignment, Insets margin ) { JButton button = new JButton( text ); button.setHorizontalAlignment( horizontalAlignment ); button.setVerticalAlignment( verticalAlignment ); if( margin != null ) button.setMargin( margin ); panel.add( button, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets( 4, 4, 4, 4 ), 0, 0 ) ); JButton htmlButton = new JButton( "HTML " + text + "" ); htmlButton.setHorizontalAlignment( horizontalAlignment ); htmlButton.setVerticalAlignment( verticalAlignment ); if( margin != null ) htmlButton.setMargin( margin ); panel.add( htmlButton, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets( 4, 4, 24, 4 ), 0, 0 ) ); } } ~~~ BTW this PR also breaks 3rd party L&Fs like [FlatLaf](https://github.com/JFormDesigner/FlatLaf). See https://github.com/JFormDesigner/FlatLaf/issues/746 ------------- PR Comment: https://git.openjdk.org/jdk/pull/8407#issuecomment-1761583430 PR Comment: https://git.openjdk.org/jdk/pull/8407#issuecomment-1761595394 From aivanov at openjdk.org Fri Oct 13 14:29:57 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 14:29:57 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> On Fri, 13 Oct 2023 11:17:31 GMT, Daniel Jeli?ski wrote: > Found and removed a few more initIDs methods that were empty on all platforms. It could be a better idea to move this clean up to a separate bugid with appropriate title. After all, removing empty initIDs affects Java sources as well. If anything goes wrong, it'll be easier to isolate the changes. What do you think? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358342299 From djelinski at openjdk.org Fri Oct 13 14:41:43 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 14:41:43 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> Message-ID: On Fri, 13 Oct 2023 14:27:07 GMT, Alexey Ivanov wrote: >> Found and removed a few more initIDs methods that were empty on all platforms. > >> Found and removed a few more initIDs methods that were empty on all platforms. > > It could be a better idea to move this clean up to a separate bugid with appropriate title. After all, removing empty initIDs affects Java sources as well. If anything goes wrong, it'll be easier to isolate the changes. > > What do you think? Sounds reasonable. Should I move the cleanup of Color as well? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358355640 From aivanov at openjdk.org Fri Oct 13 14:52:25 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 14:52:25 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <1krfOcxbylJm-JpUgovZgowmvjSao6zUOhDh1DmbGD8=.ee5aa5bc-2132-456c-9fa1-0cf9e4043c57@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6w4LWmdgSKFvv_-4KOBoZD-BLupBz1YM7-gRyjgMQ5E=.c8c21958-23a2-4e4c-a3ec-75d2e2c8ec6a@github.com> <1krfOcxbylJm-JpUgovZgowmvjSao6zUOhDh1DmbGD8=.ee5aa5bc-2132-456c-9fa1-0cf9e4043c57@github.com> Message-ID: On Fri, 13 Oct 2023 07:50:12 GMT, Daniel Jeli?ski wrote: >> ~Good point. I only checked the Linux exports/imports, will check the Windows-specific exports now.~ > > Wait a sec, these symbols are removed from the export list in this PR. Are you saying that you still see them? I saw these symbols? unless I downloaded the wrong build. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358365392 From aivanov at openjdk.org Fri Oct 13 14:52:27 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 14:52:27 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> Message-ID: On Fri, 13 Oct 2023 14:38:59 GMT, Daniel Jeli?ski wrote: > Should I move the cleanup of Color as well? Removing `colorValueID` could be left here, I think: it removes an exported symbol which is no longer used. In addition to it, it makes `Java_java_awt_Color_initIDs` empty. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358369477 From aivanov at openjdk.org Fri Oct 13 15:04:18 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 15:04:18 GMT Subject: RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v8] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 22:01:22 GMT, Damon Nguyen wrote: >> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 103: >> >>> 101: !p.equals(endPoint) && !incorrectActionDetected; >>> 102: p.translate(sign(endPoint.x - p.x), >>> 103: sign(endPoint.y - p.y))) { >> >> Suggestion: >> >> p.translate(sign(endPoint.x - p.x), >> sign(endPoint.y - p.y))) { >> >> I'm probably the only one who prefers aligning wrapped lines? Doesn't it look better? > > I agree, it does look neater. Unfortunately, my IDE doesn't default this (which makes sense) so I have to remember to do this when applicable. Thanks. I configured IDE to do it by default. Yet it doesn't make sense in all the cases. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1358382948 From djelinski at openjdk.org Fri Oct 13 15:06:48 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 15:06:48 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> Message-ID: <_MhIVPeS2EGBFhutrAODJHvtARQGVsb6txAd6tWx23U=.b10a5f91-26cf-48b9-b361-f046f96e2c46@github.com> On Fri, 13 Oct 2023 14:50:03 GMT, Alexey Ivanov wrote: >> Sounds reasonable. Should I move the cleanup of Color as well? > >> Should I move the cleanup of Color as well? > > Removing `colorValueID` could be left here, I think: it removes an exported symbol which is no longer used. > > In addition to it, it makes `Java_java_awt_Color_initIDs` empty. Ok, I'll revert the initIDs removals, and will file a follow-up PR once this one is merged. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358384108 From aivanov at openjdk.org Fri Oct 13 15:06:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 15:06:49 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <_MhIVPeS2EGBFhutrAODJHvtARQGVsb6txAd6tWx23U=.b10a5f91-26cf-48b9-b361-f046f96e2c46@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> <_MhIVPeS2EGBFhutrAODJHvtARQGVsb6txAd6tWx23U=.b10a5f91-26cf-48b9-b361-f046f96e2c46@github.com> Message-ID: <_JE8mf3K_y8CH9HAC-pGazLxLJmEvJ6ROosdWqT8g54=.04ae6ec5-bcd6-4299-a645-293dd4450c0d@github.com> On Fri, 13 Oct 2023 15:02:10 GMT, Daniel Jeli?ski wrote: > ?will file a follow-up PR once this one is merged You can submit it right away, so that we'll not forget about it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1358385429 From djelinski at openjdk.org Fri Oct 13 15:19:53 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 13 Oct 2023 15:19:53 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: > Please review this patch that removes a number of unused exports from java.desktop native libraries. > > In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: > - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. > - removed `colorValueID` in X11Color; that field was not used. > - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. > > The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. > > The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. > > Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: - Revert "Remove Color_initIDs" This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. - Revert "Remove KeyboardFocusManager_initIDs" This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. - Revert "Remove Rectangle_initIDs" This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. - Revert "Remove Button_initIDs" This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. - Revert "Remove FileDialog_initIDs" This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. - Revert "Remove TextField_initIDs" This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. - Revert "Update copyright" This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13261/files - new: https://git.openjdk.org/jdk/pull/13261/files/5808c65e..130baf3c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13261&range=03-04 Stats: 362 lines in 17 files changed: 346 ins; 3 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/13261.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13261/head:pull/13261 PR: https://git.openjdk.org/jdk/pull/13261 From duke at openjdk.org Fri Oct 13 15:24:33 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 13 Oct 2023 15:24:33 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout Message-ID: Hi Revivers, Part of stability improvement for the test case **WheelModifier.java** I have moved _getLocationOnScreen()_ and _getSize()_ into EDT, part of warning removal updated _BUTTON1_MASK_ with _BUTTON1_DOWN_MASK_ Please review and let me know your suggestions. ------------- Commit messages: - Fixed Whitespace error - Updated variable to volitile - Removed @author tag - JDK-8169475 : WheelModifier.java fails by timeout Changes: https://git.openjdk.org/jdk/pull/16185/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16185&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8169475 Stats: 25 lines in 1 file changed: 16 ins; 1 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/16185.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16185/head:pull/16185 PR: https://git.openjdk.org/jdk/pull/16185 From aivanov at openjdk.org Fri Oct 13 15:57:09 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 15:57:09 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: References: Message-ID: <6_KG9JhuqkHHXj6rka6P62AFp__Q_9msHB-Rj7R5L4I=.be975eb7-cc72-48a5-a2d8-0a4e112be4fb@github.com> On Fri, 13 Oct 2023 15:07:30 GMT, Renjith Kannath Pariyangad wrote: > Hi Revivers, > > Part of stability improvement for the test case **WheelModifier.java** I have moved _getLocationOnScreen()_ and _getSize()_ into EDT, part of warning removal updated _BUTTON1_MASK_ with _BUTTON1_DOWN_MASK_ > > Please review and let me know your suggestions. Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16185#pullrequestreview-1676789933 From abhiscxk at openjdk.org Fri Oct 13 16:32:12 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 13 Oct 2023 16:32:12 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v2] In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 05:14:11 GMT, Tejesh R wrote: >> Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. >> Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix - if spacing Should we handle the keyEvents too for the affected LAFs ? I guess test can be enhanced for all the affected LAFs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1761790074 From mikael at openjdk.org Fri Oct 13 17:41:40 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 13 Oct 2023 17:41:40 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v3] In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. Mikael Vidstedt has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - Merge branch 'master' into 8317970-macosx-x64-ver-11 - Update stale comment (again) - Update stale comment - macOS - Copyright year - Bump target macosx-x64 version to 11.00.00 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16155/files - new: https://git.openjdk.org/jdk/pull/16155/files/71334787..56a95f67 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=01-02 Stats: 5985 lines in 336 files changed: 3061 ins; 1628 del; 1296 mod Patch: https://git.openjdk.org/jdk/pull/16155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16155/head:pull/16155 PR: https://git.openjdk.org/jdk/pull/16155 From mikael at openjdk.org Fri Oct 13 18:01:44 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 13 Oct 2023 18:01:44 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v4] In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: Drop redundant MACOSX_METAL_VERSION_MIN variable ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16155/files - new: https://git.openjdk.org/jdk/pull/16155/files/56a95f67..e0e6d4e9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16155&range=02-03 Stats: 6 lines in 1 file changed: 0 ins; 5 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16155.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16155/head:pull/16155 PR: https://git.openjdk.org/jdk/pull/16155 From prr at openjdk.org Fri Oct 13 18:03:13 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 13 Oct 2023 18:03:13 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v4] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Fri, 13 Oct 2023 18:01:44 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Drop redundant MACOSX_METAL_VERSION_MIN variable Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16155#pullrequestreview-1677060373 From erikj at openjdk.org Fri Oct 13 18:13:10 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 13 Oct 2023 18:13:10 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v4] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Fri, 13 Oct 2023 18:01:44 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Drop redundant MACOSX_METAL_VERSION_MIN variable Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16155#pullrequestreview-1677077459 From mikael at openjdk.org Fri Oct 13 20:25:11 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 13 Oct 2023 20:25:11 GMT Subject: RFR: 8317970: Bump target macosx-x64 version to 11.00.00 [v4] In-Reply-To: References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Fri, 13 Oct 2023 18:01:44 GMT, Mikael Vidstedt wrote: >> macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. >> >> This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Drop redundant MACOSX_METAL_VERSION_MIN variable Thank you for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/16155#issuecomment-1762153757 From aivanov at openjdk.org Fri Oct 13 20:28:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 13 Oct 2023 20:28:19 GMT Subject: RFR: 8318101: Additional test cases for CSSAttributeEqualityBug Message-ID: Adds additional test cases to `javax/swing/text/html/CSS/CSSAttributeEqualityBug.java`. Currently, CSS parser in Java allows space between the number and the unit or percent. This is what the additional test cases verify. There's also one additional case for `border-width: medium`. ------------- Commit messages: - 8318101: Additional test cases for CSSAttributeEqualityBug Changes: https://git.openjdk.org/jdk/pull/16193/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16193&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318101 Stats: 25 lines in 1 file changed: 23 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16193.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16193/head:pull/16193 PR: https://git.openjdk.org/jdk/pull/16193 From mikael at openjdk.org Fri Oct 13 20:28:25 2023 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 13 Oct 2023 20:28:25 GMT Subject: Integrated: 8317970: Bump target macosx-x64 version to 11.00.00 In-Reply-To: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> References: <_ukL_U5w1OHObAzqseoNbcQRP39j73Fqlx1frtspC08=.70ef5ad6-dd9a-444d-9fbd-90f97e03856e@github.com> Message-ID: On Wed, 11 Oct 2023 17:49:14 GMT, Mikael Vidstedt wrote: > macOS 10.x is no longer receiving updates - the most recent/last release was 10.15.7 back in July of 2022. It's time to bump the target macOS version (min/max) for macosx-x64. macOS 11.x is still receiving updates. > > This change updates the target version for macosx-x64 to 11.00.00, which is the same version used for macosx-aarch64. This pull request has now been integrated. Changeset: 72c4dcbf Author: Mikael Vidstedt URL: https://git.openjdk.org/jdk/commit/72c4dcbfeefcd664f5e3175b24e395c1f36a05fd Stats: 22 lines in 3 files changed: 0 ins; 17 del; 5 mod 8317970: Bump target macosx-x64 version to 11.00.00 Reviewed-by: erikj, prr, ihse ------------- PR: https://git.openjdk.org/jdk/pull/16155 From kizune at openjdk.org Fri Oct 13 22:56:46 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 13 Oct 2023 22:56:46 GMT Subject: Integrated: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM In-Reply-To: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> References: <8GBYumxHMVxttcZsUGvH4m9GbePra1mAXHDnfHADaiU=.680452a5-0099-4595-a598-c0b51a8aeffd@github.com> Message-ID: On Thu, 12 Oct 2023 17:54:07 GMT, Alexander Zuev wrote: > As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side. > > Also removing test from problem list as it should pass again now. This pull request has now been integrated. Changeset: f7d6d7a0 Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/f7d6d7a04faa704155ee8df33e7d344bb962566f Stats: 14 lines in 2 files changed: 11 ins; 1 del; 2 mod 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM Reviewed-by: prr, azvegint, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16169 From duke at openjdk.org Sat Oct 14 14:16:00 2023 From: duke at openjdk.org (Karl T) Date: Sat, 14 Oct 2023 14:16:00 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v4] In-Reply-To: References: Message-ID: <3BXS_MjZRqNj22ARdUwdm3nynv6WNLSEI9o2GIVpfGU=.a6a59bf2-9f23-43ce-990a-ccb820426564@github.com> On Tue, 10 May 2022 19:03:23 GMT, Damon Nguyen wrote: >> The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. >> >> The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Added string buffer. Separated fail images. Changed exception to throw at the end of test. I really wonder why the (10 year old) issue [JDK-8015854](https://bugs.openjdk.org/browse/JDK-8015854) was accepted as bug. ? It is **not a bug in JDK**, it is a bug in users code. He sets the preferred size of the button to 30x30 and adds an HTML image to that button and expects that it is painted centered. But he ignores (or does not know) that a button has a margin (2,14,2,14 in Metal). Subtracting the margin from the preferred size results in a view size of 2x26 pixel. This view is centered withing the component bounds and the HTML image/text is painted left-top aligned in that view. This paints the HTML image/text out of center, but this is **expected behavior**. ![image](https://github.com/openjdk/jdk/assets/5604048/d3501d38-c6ae-4475-be2c-bc3f2973dbd4) If the user reduces the preferred size, he also needs to **reduce the margin**. E.g. adding following line to users code (from JDK-8015854) fixes the problem: ~~~java testButton.setMargin(new Insets(0, 0, 0, 0)); ~~~ ![image](https://github.com/openjdk/jdk/assets/5604048/96e00dad-e673-4598-9147-4702955086c6) I would recommend to **revert** this PR and also PR #7310. Both break compatibility when using HTML text in buttons. ------------- PR Comment: https://git.openjdk.org/jdk/pull/8407#issuecomment-1762926635 From javalists at cbfiddle.com Sat Oct 14 15:11:57 2023 From: javalists at cbfiddle.com (Alan Snyder) Date: Sat, 14 Oct 2023 08:11:57 -0700 Subject: Metal renderer threading issues [macOS] In-Reply-To: <23E5D171-38A8-43D6-B5D0-88A75B240DAB@cbfiddle.com> References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> <23E5D171-38A8-43D6-B5D0-88A75B240DAB@cbfiddle.com> Message-ID: <4F517578-8278-4420-A17D-68F40AF4CFDB@cbfiddle.com> >> >> On Oct 10, 2023, at 3:32 AM, Alexey Ushakov wrote: >> >> We actually changed this logic in JetBrains Runtime and invoke the CVD api only from one thread but still I see multiple display link threads on M2 machines in some rare cases. So it maybe OS related issue. > Did the change to use a single thread make any difference? -------------- next part -------------- An HTML attachment was scrubbed... URL: From duke at openjdk.org Sun Oct 15 02:59:19 2023 From: duke at openjdk.org (=?UTF-8?B?5p+z6bKy6bmP?=) Date: Sun, 15 Oct 2023 02:59:19 GMT Subject: RFR: 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea [v9] In-Reply-To: <2EKEnJHyyNRaK2J-D74dxolrchS59M2b3YROeMNlx9k=.a9abb3b3-a5d5-49e0-8833-365c9e708708@github.com> References: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> <2EKEnJHyyNRaK2J-D74dxolrchS59M2b3YROeMNlx9k=.a9abb3b3-a5d5-49e0-8833-365c9e708708@github.com> Message-ID: On Sat, 16 Sep 2023 23:56:26 GMT, ??? wrote: >> Candidat box can moving with caret on windows version. Someone must wrote codes for linux(ubuntu), but it doesn't work, so he didn't commit the codes. Why it doesn't work, is the key problem. >> >> 1, I wrote a example for linux: >> https://github.com/quantum6/X11InputMethod >> >> I tried all parameters to test and as my research: >> If you use XIMPreeditCallbacks to initiate, the box can't be moved with caret. >> If you use XIMPreeditNothing, it works. >> All examples use XIMPreeditCallbacks to initiate input method and candidate box can't moving. So I understand why he didn't commit the codes. >> >> 2, I traced the route of transfering caret coordites on windows version, then add codes for linux. >> 3, Taishan Office(like Microsoft Office Word) is running on jdk, we tested for a long time, it works OK. >> 4, I am not sure for AIX( no environment). >> >> >> JDK-8264728 : When use chinese IME, the candidate box isn't moved with caret of JTextArea >> Type: Bug >> Component: client-libs >> Sub-Component: java.awt:i18n >> Affected Version: 8,9,15,16 >> Priority: P3 >> Status: Open >> Resolution: Unresolved >> OS: linux >> CPU: x86_64 > > ??? has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision: > > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - Update to lastest > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - Remove tab > - Update to latest and make code safer > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea Hello! Is there anyone to review thic ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/13055#issuecomment-1763248521 From aivanov at openjdk.org Sun Oct 15 19:00:58 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Sun, 15 Oct 2023 19:00:58 GMT Subject: RFR: JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 03:24:36 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > I have added screen shot capturing facility to the test case and that will help for debugging in case of failure. Please review and let me know your suggestions or comments if any. > > Regards, > Renjith. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16067#pullrequestreview-1678845664 From duke at openjdk.org Mon Oct 16 00:56:35 2023 From: duke at openjdk.org (=?UTF-8?B?5p+z6bKy6bmP?=) Date: Mon, 16 Oct 2023 00:56:35 GMT Subject: RFR: 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea [v10] In-Reply-To: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> References: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> Message-ID: <-23zjAMiaToCpf-YQY_kcUKUrfcyOODcFFPh0Dpym-E=.2f0c0300-58a5-4e74-8049-67dbb71a9941@github.com> > Candidat box can moving with caret on windows version. Someone must wrote codes for linux(ubuntu), but it doesn't work, so he didn't commit the codes. Why it doesn't work, is the key problem. > > 1, I wrote a example for linux: > https://github.com/quantum6/X11InputMethod > > I tried all parameters to test and as my research: > If you use XIMPreeditCallbacks to initiate, the box can't be moved with caret. > If you use XIMPreeditNothing, it works. > All examples use XIMPreeditCallbacks to initiate input method and candidate box can't moving. So I understand why he didn't commit the codes. > > 2, I traced the route of transfering caret coordites on windows version, then add codes for linux. > 3, Taishan Office(like Microsoft Office Word) is running on jdk, we tested for a long time, it works OK. > 4, I am not sure for AIX( no environment). > > > JDK-8264728 : When use chinese IME, the candidate box isn't moved with caret of JTextArea > Type: Bug > Component: client-libs > Sub-Component: java.awt:i18n > Affected Version: 8,9,15,16 > Priority: P3 > Status: Open > Resolution: Unresolved > OS: linux > CPU: x86_64 ??? has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision: - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Update to lastest - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Remove tab - Update to latest and make code safer - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13055/files - new: https://git.openjdk.org/jdk/pull/13055/files/97450047..df6c7628 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13055&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13055&range=08-09 Stats: 62996 lines in 1571 files changed: 36297 ins; 17242 del; 9457 mod Patch: https://git.openjdk.org/jdk/pull/13055.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13055/head:pull/13055 PR: https://git.openjdk.org/jdk/pull/13055 From tr at openjdk.org Mon Oct 16 04:12:56 2023 From: tr at openjdk.org (Tejesh R) Date: Mon, 16 Oct 2023 04:12:56 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v2] In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 16:29:44 GMT, Abhishek Kumar wrote: > Should we handle the keyEvents too for the affected LAFs ? > > I guess test can be enhanced for all the affected LAFs. The same test cannot be enhanced for all available LAF. The placement and layout of components differs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1763694771 From arapte at openjdk.org Mon Oct 16 06:30:51 2023 From: arapte at openjdk.org (Ambarish Rapte) Date: Mon, 16 Oct 2023 06:30:51 GMT Subject: RFR: 8154846: SwingNode does not resize when content size constraints are changed [v4] In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 07:25:54 GMT, Prasanta Sadhukhan wrote: >> SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. >> >> JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` >> >> so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revalidate component after add Marked as reviewed by arapte (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15960#pullrequestreview-1679198125 From psadhukhan at openjdk.org Mon Oct 16 07:51:31 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 16 Oct 2023 07:51:31 GMT Subject: RFR: 8318102: macos10.14 check in CSystemColors can be removed. Message-ID: Since [ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) in integrated to make macOS 11 the minimum version to build jdk, the 10.14 check added in [JDK-8284166](https://bugs.openjdk.org/browse/JDK-8284166) is not needed and can be removed.. ------------- Commit messages: - 8318102: macos10.14 check in CSystemColors can be removed. - Merge remote-tracking branch 'upstream/master' - Merge remote-tracking branch 'upstream/master' - Revert "Fix" - Fix Changes: https://git.openjdk.org/jdk/pull/16198/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16198&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318102 Stats: 10 lines in 1 file changed: 0 ins; 8 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16198.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16198/head:pull/16198 PR: https://git.openjdk.org/jdk/pull/16198 From duke at openjdk.org Mon Oct 16 10:31:17 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 16 Oct 2023 10:31:17 GMT Subject: Integrated: JDK-8317112 : Add screenshot for Frame/DefaultSizeTest.java In-Reply-To: References: Message-ID: On Fri, 6 Oct 2023 03:24:36 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > I have added screen shot capturing facility to the test case and that will help for debugging in case of failure. Please review and let me know your suggestions or comments if any. > > Regards, > Renjith. This pull request has now been integrated. Changeset: a36eaf03 Author: Renjith Kannath Pariyangad Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/a36eaf03afd148581a9d9754f85a652cac84d655 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8317112: Add screenshot for Frame/DefaultSizeTest.java Reviewed-by: prr, dnguyen, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16067 From psadhukhan at openjdk.org Mon Oct 16 10:31:27 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 16 Oct 2023 10:31:27 GMT Subject: Integrated: 8154846: SwingNode does not resize when content size constraints are changed In-Reply-To: References: Message-ID: On Thu, 28 Sep 2023 09:43:25 GMT, Prasanta Sadhukhan wrote: > SwingNode does not update its internal cache of Swing pref/max/min height and widths when its JComponent content's corresponding size constraints are updated. As such, it isn't resized to honor those size constraints. > > JLightweightFrame does install a PropertyChangeListener for "preferredSize", "maximumSize", and "minimumSize" properties, but this only happens via a ContainerListener which is not added until after the content has already been added to the content pane, and since the application cannot call this methods directly as per the documentation for the SwingNode.resize() method: `Applications should not invoke this method directly. If an application needs to directly set the size of the SwingNode, it should set the Swing component's minimum/preferred/maximum size constraints which will be propagated correspondingly to the SwingNode and it's parent will honor those settings during layout.` > > so the fix is to add the listener as soon as the component is added to the JLightweightFrame's content. This pull request has now been integrated. Changeset: 37eb9860 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/37eb98604f4e2c241d959c7e2b337beb047421da Stats: 16 lines in 1 file changed: 9 ins; 7 del; 0 mod 8154846: SwingNode does not resize when content size constraints are changed Reviewed-by: prr, angorya, arapte ------------- PR: https://git.openjdk.org/jdk/pull/15960 From duke at openjdk.org Mon Oct 16 11:01:59 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 16 Oct 2023 11:01:59 GMT Subject: Integrated: JDK-8318154 : Improve stability of WheelModifier.java test In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 15:07:30 GMT, Renjith Kannath Pariyangad wrote: > Hi Revivers, > > Part of stability improvement for the test case **WheelModifier.java** I have moved _getLocationOnScreen()_ and _getSize()_ into EDT, part of warning removal updated _BUTTON1_MASK_ with _BUTTON1_DOWN_MASK_ > > Please review and let me know your suggestions. This pull request has now been integrated. Changeset: 668d4b07 Author: Renjith Kannath Pariyangad Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/668d4b077f260a30a90842a01b38a9cf6718d418 Stats: 25 lines in 1 file changed: 16 ins; 1 del; 8 mod 8318154: Improve stability of WheelModifier.java test Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16185 From aivanov at openjdk.org Mon Oct 16 12:09:50 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 16 Oct 2023 12:09:50 GMT Subject: RFR: 8317696: Fix compilation with clang-16 [v4] In-Reply-To: References: Message-ID: On Wed, 11 Oct 2023 09:27:30 GMT, Jan Kratochvil wrote: >> `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` >> >> While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. >> >> >> src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_network_address_parse_uri)(proxies[i], 0, >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> phost = (*g_network_address_get_hostname)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> pport = (*g_network_address_get_port)(conn); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_strfreev)(proxies); >> ^ >> src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] >> (*g_clear_error)(&error); >> ^ >> Compiling X11Renderer.c (for libawt_headless.so) >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: >> In file included from src/java.desktop/unix/native/common/java2d/x11/X11Surf... > > Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision: > > Remove the XShmQueryExtension declaration completely. Client tests are green. Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16092#pullrequestreview-1679806119 From mbaesken at openjdk.org Mon Oct 16 15:52:47 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 16 Oct 2023 15:52:47 GMT Subject: RFR: JDK-8313764: Offer JVM HS functionality to shared lib load operations done by the JDK codebase [v2] In-Reply-To: References: Message-ID: On Wed, 23 Aug 2023 15:18:03 GMT, Matthias Baesken wrote: >> Currently there is a number of functionality that would be interesting to have for shared lib load operations in the JDK C code. >> Some examples : >> Events::log_dll_message for hs-err files reporting >> JFR event NativeLibraryLoad >> There is the need to update the shared lib Cache on AIX ( see LoadedLibraries::reload() , see also https://bugs.openjdk.org/browse/JDK-8314152 ), >> this is currently not fully in sync with libs loaded form jdk c-libs and sometimes reports outdated information >> >> Offer an interface (e.g. jvm.cpp) to support this. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > windows aarch64 build issues Hello, any comments about the idea of calling into 'os::dll_load' instead ? That would indeed make the coding smaller and less 'messy' . ------------- PR Comment: https://git.openjdk.org/jdk/pull/15264#issuecomment-1764687056 From prr at openjdk.org Mon Oct 16 16:28:52 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 16 Oct 2023 16:28:52 GMT Subject: RFR: 8318102: macos10.14 check in CSystemColors can be removed. In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 07:43:06 GMT, Prasanta Sadhukhan wrote: > Since [ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) in integrated to make macOS 11 the minimum version to build jdk, the 10.14 check added in [JDK-8284166](https://bugs.openjdk.org/browse/JDK-8284166) is not needed and can be removed.. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16198#pullrequestreview-1680479892 From martin.desruisseaux at geomatys.com Mon Oct 16 16:37:12 2023 From: martin.desruisseaux at geomatys.com (Martin Desruisseaux) Date: Mon, 16 Oct 2023 18:37:12 +0200 Subject: Can someone reopen the BufferedImage.setData(Raster) bug fix proposal? Message-ID: <6f860eea-35b2-409f-a2a4-702169402330@geomatys.com> Hello all https://github.com/openjdk/jdk/pull/13797 has been closed due to lack of activity, but the bug that it describes is still present. The bug is causing data lost when the type of sample values is a floating point type. The proposed fix would not only fix that bug, but also makes the code simpler and potentially faster. This bug is waiting for a mentor since May. Can someone reopen it, or should I create a new pull request? One open question was whether to expand the scope of this bug fix to other methods suffering the same problem, such as BufferedImage.getData(). ??? Martin From philip.race at oracle.com Mon Oct 16 16:58:46 2023 From: philip.race at oracle.com (Philip Race) Date: Mon, 16 Oct 2023 09:58:46 -0700 Subject: Can someone reopen the BufferedImage.setData(Raster) bug fix proposal? In-Reply-To: <6f860eea-35b2-409f-a2a4-702169402330@geomatys.com> References: <6f860eea-35b2-409f-a2a4-702169402330@geomatys.com> Message-ID: <5e3f4837-8235-4863-b052-adc95fe9e1f1@oracle.com> I guess you found you can do this yourself. -phil. On 10/16/23 9:37 AM, Martin Desruisseaux wrote: > Hello all > > https://github.com/openjdk/jdk/pull/13797 has been closed due to lack > of activity, but the bug that it describes is still present. The bug > is causing data lost when the type of sample values is a floating > point type. The proposed fix would not only fix that bug, but also > makes the code simpler and potentially faster. This bug is waiting for > a mentor since May. Can someone reopen it, or should I create a new > pull request? > > One open question was whether to expand the scope of this bug fix to > other methods suffering the same problem, such as > BufferedImage.getData(). > > ??? Martin > > From martin.desruisseaux at geomatys.com Mon Oct 16 17:00:22 2023 From: martin.desruisseaux at geomatys.com (Martin Desruisseaux) Date: Mon, 16 Oct 2023 19:00:22 +0200 Subject: Can someone reopen the BufferedImage.setData(Raster) bug fix proposal? In-Reply-To: <5e3f4837-8235-4863-b052-adc95fe9e1f1@oracle.com> References: <6f860eea-35b2-409f-a2a4-702169402330@geomatys.com> <5e3f4837-8235-4863-b052-adc95fe9e1f1@oracle.com> Message-ID: <3823ca22-4122-483f-a32e-8fe26d4ca84c@geomatys.com> Le 2023-10-16 ? 18 h 58, Philip Race a ?crit?: > I guess you found you can do this yourself. Yes, sorry. I though that only project administrators could do that. Thanks to Sergey Bylokhov for putting me on track. ??? Martin From aivanov at openjdk.org Mon Oct 16 19:29:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 16 Oct 2023 19:29:49 GMT Subject: RFR: 8318102: macos10.14 check in CSystemColors can be removed. In-Reply-To: References: Message-ID: <2fiTj9qF99D_mlOWexdB4fuClqU2T82ljjHUOA3yrCc=.ccf38adb-a7c7-46ee-b62d-7289d0f13e79@github.com> On Mon, 16 Oct 2023 07:43:06 GMT, Prasanta Sadhukhan wrote: > Since [ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) in integrated to make macOS 11 the minimum version to build jdk, the 10.14 check added in [JDK-8284166](https://bugs.openjdk.org/browse/JDK-8284166) is not needed and can be removed.. Marked as reviewed by aivanov (Reviewer). src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m line 1: > 1: /* Should the copyright year be updated to 2023? [JDK-8284166](https://bugs.openjdk.org/browse/JDK-8284166) updated it. ------------- PR Review: https://git.openjdk.org/jdk/pull/16198#pullrequestreview-1680812899 PR Review Comment: https://git.openjdk.org/jdk/pull/16198#discussion_r1361175865 From tr at openjdk.org Tue Oct 17 04:40:05 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 17 Oct 2023 04:40:05 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v3] In-Reply-To: References: Message-ID: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated test for multiple L&F ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16068/files - new: https://git.openjdk.org/jdk/pull/16068/files/ea9a2ba7..c236b023 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=01-02 Stats: 87 lines in 1 file changed: 50 ins; 23 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From tr at openjdk.org Tue Oct 17 04:40:05 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 17 Oct 2023 04:40:05 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v2] In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 04:10:14 GMT, Tejesh R wrote: > Should we handle the keyEvents too for the affected LAFs ? > > I guess test can be enhanced for all the affected LAFs. I have updated the test for all Look and Feel by testing `Open` button. Tested in CI. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16068#issuecomment-1765651762 From jkratochvil at openjdk.org Tue Oct 17 08:18:32 2023 From: jkratochvil at openjdk.org (Jan Kratochvil) Date: Tue, 17 Oct 2023 08:18:32 GMT Subject: Integrated: 8317696: Fix compilation with clang-16 In-Reply-To: References: Message-ID: On Sat, 7 Oct 2023 16:24:29 GMT, Jan Kratochvil wrote: > `--with-toolchain-type=clang` fails the compilation for me with `clang-16.0.6-3.fc38.x86_64` > > While the warnings can be disabled I find better to just fix them. The GTK prototypes in JDK reported by clang are either missing or wrong. > > > src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > phost = (*g_network_address_get_hostname)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > pport = (*g_network_address_get_port)(conn); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_strfreev)(proxies); > ^ > src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] > (*g_clear_error)(&error); > ^ > Compiling X11Renderer.c (for libawt_headless.so) > In file included from src/java.desktop/unix/native/common/java2d/x11/X11PMBlitLoops.c:29: > In file included from src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h:29: > src/java.desktop/unix/native/common/aw... This pull request has now been integrated. Changeset: e4329a82 Author: Jan Kratochvil Committer: Yuri Nesterenko URL: https://git.openjdk.org/jdk/commit/e4329a823bf9fd23c772342729ef4a4fb50381ac Stats: 15 lines in 4 files changed: 0 ins; 2 del; 13 mod 8317696: Fix compilation with clang-16 Reviewed-by: djelinski, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16092 From alexey.ushakov at jetbrains.com Tue Oct 17 11:10:29 2023 From: alexey.ushakov at jetbrains.com (Alexey Ushakov) Date: Tue, 17 Oct 2023 13:10:29 +0200 Subject: Metal renderer threading issues [macOS] In-Reply-To: <4F517578-8278-4420-A17D-68F40AF4CFDB@cbfiddle.com> References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> <23E5D171-38A8-43D6-B5D0-88A75B240DAB@cbfiddle.com> <4F517578-8278-4420-A17D-68F40AF4CFDB@cbfiddle.com> Message-ID: <34EA3BD1-255D-469C-AC1F-54BEE951D42A@jetbrains.com> Not sure about this particular case but in general the change that we have in our fork allows to have a one CVD thread per display (not per MTLLayer as we have in OpenJDK mainstream). But even this optimization is not enough for my opinion. We are currently working on the change that performs updates without any display link thread (similar to what we have in OGL). The display link approach introduced in the Metal pipeline was kind of a workaround for the missing content artifacts due some flaws in synchronization. I think that after fixing all the synchronization issues we?ll be able to get rid of display link threads completely. Best Regards, Alexey > On Oct 14, 2023, at 5:11 PM, Alan Snyder wrote: > > >>> >>> On Oct 10, 2023, at 3:32 AM, Alexey Ushakov wrote: >>> >>> We actually changed this logic in JetBrains Runtime and invoke the CVD api only from one thread but still I see multiple display link threads on M2 machines in some rare cases. So it maybe OS related issue. >> > > Did the change to use a single thread make any difference? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhiscxk at openjdk.org Tue Oct 17 11:49:35 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 17 Oct 2023 11:49:35 GMT Subject: RFR: 8318104: macOS 10.13 check in TabButtonAccessibility.m can be removed Message-ID: <5g7tLIkofAuSpAXiymjkX_bNZnCJsFM8gUs9bq64Kls=.632e7079-a749-4b7c-b60f-2bd7255351e8@github.com> Since[ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) is integrated to make macOS 11 the minimum version to build jdk, the 10.13 check is not needed and can be removed from TabButtonAccessibility.m file. ------------- Commit messages: - macOS 10.13 check can be removed Changes: https://git.openjdk.org/jdk/pull/16218/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16218&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318104 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16218.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16218/head:pull/16218 PR: https://git.openjdk.org/jdk/pull/16218 From aivanov at openjdk.org Tue Oct 17 12:16:10 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 17 Oct 2023 12:16:10 GMT Subject: RFR: 8318104: macOS 10.13 check in TabButtonAccessibility.m can be removed In-Reply-To: <5g7tLIkofAuSpAXiymjkX_bNZnCJsFM8gUs9bq64Kls=.632e7079-a749-4b7c-b60f-2bd7255351e8@github.com> References: <5g7tLIkofAuSpAXiymjkX_bNZnCJsFM8gUs9bq64Kls=.632e7079-a749-4b7c-b60f-2bd7255351e8@github.com> Message-ID: On Tue, 17 Oct 2023 11:42:40 GMT, Abhishek Kumar wrote: > Since[ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) is integrated to make macOS 11 the minimum version to build jdk, the 10.13 check is not needed and can be removed from TabButtonAccessibility.m file. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16218#pullrequestreview-1682160981 From lkorinth at openjdk.org Tue Oct 17 12:29:46 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 17 Oct 2023 12:29:46 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v4] In-Reply-To: References: Message-ID: <4pRda3ZAZzVzGiVrDv6LN9Pw__DhrmTm4qZjTHzaq80=.a009bb29-4869-4047-8b62-80fbe7bef692@github.com> > Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. > > I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` > > Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: > > /** > * Create ProcessBuilder using the java launcher from the jdk to > * be tested. > * > *

Please observe that you likely should use > * createTestJvm() instead of this method because createTestJvm() > * will add JVM options from "test.vm.opts" and "test.java.opts" > * and this method will not do that. > * > * @param command Arguments to pass to the java command. > * @return The ProcessBuilder instance representing the java command. > */ > > > I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... > > I have run tier 1 testing, and I have started more exhaustive testing. Leo Korinth has updated the pull request incrementally with three additional commits since the last revision: - Revert "8315097: Rename createJavaProcessBuilder" This reverts commit 4b2d171133c40c5c48114602bfd0d4da75531317. - Revert "copyright" This reverts commit f3418c80cc0d4cbb722ee5e368f1a001e898b43e. - Revert "fix static import" This reverts commit 27da71508aec9a4bec1c0ad07031887286580171. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15452/files - new: https://git.openjdk.org/jdk/pull/15452/files/27da7150..44af07b9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=02-03 Stats: 1102 lines in 462 files changed: 11 ins; 22 del; 1069 mod Patch: https://git.openjdk.org/jdk/pull/15452.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15452/head:pull/15452 PR: https://git.openjdk.org/jdk/pull/15452 From duke at openjdk.org Tue Oct 17 12:40:14 2023 From: duke at openjdk.org (duke) Date: Tue, 17 Oct 2023 12:40:14 GMT Subject: Withdrawn: 8302687 Implement interfaces and shared code for announcement feature In-Reply-To: References: Message-ID: On Mon, 13 Mar 2023 16:46:10 GMT, Artem Semenov wrote: > This enhancement covers basic API and shared code that should be implemented for the Accessibility Announcement feature. > > CSR [JDK-8304499](https://bugs.openjdk.org/browse/JDK-8304499 "bugs.openjdk.org") > > @mrserb @prrace @azuev-java please review This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/13001 From honkar at openjdk.org Tue Oct 17 17:53:56 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 17 Oct 2023 17:53:56 GMT Subject: RFR: JDK-8316030: Update Libpng to 1.6.40 Message-ID: Libpng updated from 1.6.39 to 1.6.40 Build and CI Testing passes on all platforms. ------------- Commit messages: - .md file changes - libpng source file changes Changes: https://git.openjdk.org/jdk/pull/16223/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16223&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316030 Stats: 246 lines in 11 files changed: 89 ins; 82 del; 75 mod Patch: https://git.openjdk.org/jdk/pull/16223.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16223/head:pull/16223 PR: https://git.openjdk.org/jdk/pull/16223 From prr at openjdk.org Tue Oct 17 20:30:41 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 17 Oct 2023 20:30:41 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS [v2] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 16:48:11 GMT, Alexander Scherbatiy wrote: >> The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well. >> >> - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): ?output-bin? attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document. >> - `CUPSPrinter.getOutputBins(String printer)` method uses PPD `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level. >> - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS. >> >> The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): >> - Printer settings, None >> - Inner tray, INNERTRAY >> - Separator tray, SEPARATORTRAY >> - Finisher (face-down), Main >> >> if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS. > > Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision: > > Remove System.out.printf(...) Why did you file a new RFE when you know about the existing one ? Close your new one as a dup. and redirect everything to the existing one. Also I don't see any UI work to enhance the dialog so it can be selected. And why restrict it to macOS ? Is it an issue of testing ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16166#issuecomment-1767120078 From prr at openjdk.org Tue Oct 17 21:35:12 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 17 Oct 2023 21:35:12 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS [v2] In-Reply-To: References: Message-ID: On Thu, 12 Oct 2023 16:48:11 GMT, Alexander Scherbatiy wrote: >> The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well. >> >> - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): ?output-bin? attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document. >> - `CUPSPrinter.getOutputBins(String printer)` method uses PPD `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level. >> - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS. >> >> The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): >> - Printer settings, None >> - Inner tray, INNERTRAY >> - Separator tray, SEPARATORTRAY >> - Finisher (face-down), Main >> >> if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS. > > Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision: > > Remove System.out.printf(...) src/java.desktop/share/classes/javax/print/attribute/standard/OutputBin.java line 47: > 45: * IPP Compatibility: The category name returned by {@code getName()} is > 46: * the IPP attribute name. The {@code toString()} method returns the IPP > 47: * string representation of the attribute value. I think this needs to mention that it is an IPP extension attribute, meaning not a standard one For example like here https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/print/attribute/standard/PresentationDirection.html ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16166#discussion_r1362764128 From dholmes at openjdk.org Wed Oct 18 05:35:46 2023 From: dholmes at openjdk.org (David Holmes) Date: Wed, 18 Oct 2023 05:35:46 GMT Subject: RFR: JDK-8313764: Offer JVM HS functionality to shared lib load operations done by the JDK codebase [v2] In-Reply-To: References: Message-ID: <-mnRIhYxnLvgUVnwxr_thupKgzfav_NdaT79AS1PO7M=.7cb2174c-9808-42ea-beb7-312ebab3e683@github.com> On Mon, 16 Oct 2023 15:04:51 GMT, Matthias Baesken wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> windows aarch64 build issues > > Hello, any comments about the idea of calling into 'os::dll_load' instead ? That would indeed make the coding smaller and less 'messy' . @MBaesken I'm not at all sure what it would look like - sorry. But there doesn't seem to be any general support from the library folk for this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15264#issuecomment-1767673904 From aivanov at openjdk.org Wed Oct 18 11:50:10 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 18 Oct 2023 11:50:10 GMT Subject: RFR: JDK-8314246: javax/swing/JToolBar/4529206/bug4529206.java fails intermittently on Linux [v2] In-Reply-To: References: Message-ID: On Wed, 16 Aug 2023 23:46:09 GMT, Harshitha Onkar wrote: > Oh, I didn't notice that `setAutoWaitForIdle()` was not used the first time. I have changed it. I think adding a small amount of delay after `makeToolbarFloat()` is good in addition to `setAutoWaitForIdle()` to stabilize the test on slower systems. I think this was a bad decision: now the test **never** calls `waitForIdle()`. But it should do it? for stability? after it takes any action. This test does not use `Robot` to send any events, but `robot.setAutoWaitForIdle(true)` affects only *mouse and keyboard events*: [`Robot.autoWaitForIdle()`](https://github.com/openjdk/jdk/blob/6fc35142315f1616fa35e415005c9483939c6920/src/java.desktop/share/classes/java/awt/Robot.java#L688) is called from `afterEvent`, just like `autoDelay`: https://github.com/openjdk/jdk/blob/6fc35142315f1616fa35e415005c9483939c6920/src/java.desktop/share/classes/java/awt/Robot.java#L662-L665 I submitted [JDK-8318423](https://bugs.openjdk.org/browse/JDK-8318423): Add explicit robot.waitForIdle to JToolBar/4529206/bug4529206.java ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15316#discussion_r1363726279 From aivanov at openjdk.org Wed Oct 18 13:35:05 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 18 Oct 2023 13:35:05 GMT Subject: RFR: 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913 Message-ID: Update ProblemList entry for java/awt/PopupMenu/PopupMenuLocation.java to [JDK-8259913](https://bugs.openjdk.org/browse/JDK-8259913) which is a specific bug for AWT menus in High DPI environment. ------------- Commit messages: - 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913 Changes: https://git.openjdk.org/jdk/pull/16246/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16246&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318448 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16246.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16246/head:pull/16246 PR: https://git.openjdk.org/jdk/pull/16246 From alexsch at openjdk.org Wed Oct 18 17:36:49 2023 From: alexsch at openjdk.org (Alexander Scherbatiy) Date: Wed, 18 Oct 2023 17:36:49 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS [v3] In-Reply-To: References: Message-ID: > The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well. > > - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): ?output-bin? attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document. > - `CUPSPrinter.getOutputBins(String printer)` method uses PPD `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level. > - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS. > > The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): > - Printer settings, None > - Inner tray, INNERTRAY > - Separator tray, SEPARATORTRAY > - Finisher (face-down), Main > > if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS. Alexander Scherbatiy has updated the pull request incrementally with three additional commits since the last revision: - Add empty lines between OutputBin constants - Add Override annotation to OutputBin and CustomOutputBin methods - Update OutputBin IPP Compatibility description ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16166/files - new: https://git.openjdk.org/jdk/pull/16166/files/847059e9..7fa504a1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=01-02 Stats: 21 lines in 2 files changed: 18 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16166.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16166/head:pull/16166 PR: https://git.openjdk.org/jdk/pull/16166 From alexsch at openjdk.org Wed Oct 18 17:36:52 2023 From: alexsch at openjdk.org (Alexander Scherbatiy) Date: Wed, 18 Oct 2023 17:36:52 GMT Subject: RFR: 8318023: Implement IPP output-bin attribute extension on macOS [v2] In-Reply-To: References: Message-ID: On Tue, 17 Oct 2023 20:28:20 GMT, Phil Race wrote: > Why did you file a new RFE when you know about the existing one ? Close your new one as a dup. and redirect everything to the existing one. Also I don't see any UI work to enhance the dialog so it can be selected. And why restrict it to macOS ? Is it an issue of testing ? My idea was to use JDK-8314070 as an umbrella and provide fixes for macOS, Linux, and Windows separately. While the OutputBin public API is not fixed any change in it would require to re-test the fix on all 3 platforms. The fix for the UI dialog requires an additional test with a printer dialog so there would be 2 tests for each platform for re-testing for each essential change in the fix. > src/java.desktop/share/classes/javax/print/attribute/standard/OutputBin.java line 47: > >> 45: * IPP Compatibility: The category name returned by {@code getName()} is >> 46: * the IPP attribute name. The {@code toString()} method returns the IPP >> 47: * string representation of the attribute value. > > I think this needs to mention that it is an IPP extension attribute, meaning not a standard one > For example like here > https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/print/attribute/standard/PresentationDirection.html The javadoc is updated to * IPP Compatibility: This attribute is not an IPP 1.1 attribute; it is * an attribute in the "output-bin" attribute extension * ( * PDF) of IPP 1.1. The category name returned by {@code getName()} is the * IPP attribute name. The enumeration's integer value is the IPP enum value. * The {@code toString()} method returns the IPP string representation of the * attribute value. and `@Override` annotations are added to `OutputBin` and `CustomOutputBin` methods. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16166#issuecomment-1768991703 PR Review Comment: https://git.openjdk.org/jdk/pull/16166#discussion_r1364254788 From serb at openjdk.org Wed Oct 18 20:07:43 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 18 Oct 2023 20:07:43 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Tue, 29 Aug 2023 22:04:40 GMT, Phil Race wrote: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout @prrace did you check how this change affects the performance, especially startup? I have experimented with Panama for littlecms: https://bugs.openjdk.org/browse/JDK-8313344 and found that the biggest issue is a cold start, 8 ms vs 100ms. An example of the report: https://jmh.morethan.io/?gists=4df0f27789cc4b0ca91fc5b2d677fe39,900b547e073cc1567971f46bfea151db ------------- PR Comment: https://git.openjdk.org/jdk/pull/15476#issuecomment-1698413107 From prr at openjdk.org Wed Oct 18 20:07:43 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:07:43 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Message-ID: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout ------------- Commit messages: - remove tailing white space - use scaling - Fix windows build, remove perf. logging - Add test, fix bug - use allocateFrom - add offset param - suppressed restricted warnings, now builds but not running yet - Adapt to changed API for FFM final - Merge - Use exact VarHandles - ... and 7 more: https://git.openjdk.org/jdk/compare/77fa44fd...8d826865 Changes: https://git.openjdk.org/jdk/pull/15476/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318364 Stats: 1374 lines in 7 files changed: 1372 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15476.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15476/head:pull/15476 PR: https://git.openjdk.org/jdk/pull/15476 From prr at openjdk.org Wed Oct 18 20:07:45 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:07:45 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 02:55:34 GMT, Sergey Bylokhov wrote: > @prrace did you check how this change affects the performance, especially startup? I have experimented with Panama for littlecms: https://bugs.openjdk.org/browse/JDK-8313344 and found that the biggest issue is a cold start, 8 ms vs 100ms. An example of the report: https://jmh.morethan.io/?gists=4df0f27789cc4b0ca91fc5b2d677fe39,900b547e073cc1567971f46bfea151db Hmm. I didn't notice this comment until today. No emails for drafts ? Probably I should not have posted this PR even as draft if it is going to get attention as it isn't really ready for that. But yes, I had already measured startup + warmup and noticed that's an issue. It may be doesn't matter so much for OpenType layout as other things that are always on the critical path, but it is definitely a concern. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15476#issuecomment-1702114439 From serb at openjdk.org Wed Oct 18 20:07:46 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 18 Oct 2023 20:07:46 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 03:45:24 GMT, Phil Race wrote: > Probably I should not have posted this PR even as draft if it is going to get attention as it isn't really ready for that. No! That is really interesting proposal and discussion! BTW this PR is not in the draft state. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15476#issuecomment-1702168525 From pminborg at openjdk.org Wed Oct 18 20:07:57 2023 From: pminborg at openjdk.org (Per Minborg) Date: Wed, 18 Oct 2023 20:07:57 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Tue, 29 Aug 2023 22:04:40 GMT, Phil Race wrote: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout src/java.desktop/share/classes/sun/font/HBShaper.java line 55: > 53: public class HBShaper { > 54: > 55: /* Nice with the original C struct as a comment. src/java.desktop/share/classes/sun/font/HBShaper.java line 65: > 63: * }; > 64: */ > 65: private static final UnionLayout VarIntLayout = MemoryLayout.unionLayout( I was a bit confused by the naming. Suggest `VarIntLayout` -> `VAR_INT_LAYOUT` src/java.desktop/share/classes/sun/font/HBShaper.java line 108: > 106: ).withName("hb_glyph_info_t"); > 107: > 108: private static VarHandle getVarHandle(MemoryLayout layout, String name) { This method could take a `SequenceLayout` instead of a `MemoryLayout` as it only works for SeequenceLayouts. src/java.desktop/share/classes/sun/font/HBShaper.java line 129: > 127: private static MethodHandle jdk_hb_shape_handle; > 128: > 129: private static FunctionDescriptor get_nominal_glyph_fd; All the `*_fd` variables could be converted into local variables. src/java.desktop/share/classes/sun/font/HBShaper.java line 130: > 128: > 129: private static FunctionDescriptor get_nominal_glyph_fd; > 130: private static MethodHandle get_nominal_glyph_mh; Declaring all these `final` would improve performance. For example `private static final FunctionDescription GET_NOMINAL_GLYPH_MH;` src/java.desktop/share/classes/sun/font/HBShaper.java line 314: > 312: Font2D font2D = scopedFont2D.get(); > 313: int glyphID = font2D.charToGlyph(unicode); > 314: MemorySegment glyphIDPtr = glyph.reinterpret(4); As a general comment, it is better to use slicing rather than reinterpret. src/java.desktop/share/classes/sun/font/HBShaper.java line 405: > 403: private static final ScopedValue scopedFontStrike = ScopedValue.newInstance(); > 404: private static final ScopedValue scopedGVData = ScopedValue.newInstance(); > 405: private static final ScopedValue scopedStartPt = ScopedValue.newInstance(); Using only one ScopedValue and storing a `record(Font2D font2D, FontStrike fontStrike, GVData gvData, Point2D.float point2d) {}` of the various objects will provide much better performance. src/java.desktop/share/classes/sun/font/HBShaper.java line 428: > 426: * The alternative of creating bound method handles is far too slow. > 427: */ > 428: ScopedValue.where(scopedFont2D, font2D) I think a static `ConcurrentHashMap` would provide better performance. We could clean up the key when the value is used. Use the Thread.threadId() as the key. src/java.desktop/share/classes/sun/font/HBShaper.java line 468: > 466: * done with it. > 467: */ > 468: MemorySegment data_ptr = data_ptr_out.reinterpret(ADDRESS.byteSize()); Suggest using `.asSlice()` here as it is an unrestricted and safer method. src/java.desktop/share/classes/sun/font/HBShaper.java line 474: > 472: } > 473: byte[] data = font2D.getTableBytes(tag); > 474: if (data == null) { No setting data_ptr_out to NULL here? src/java.desktop/share/classes/sun/font/HBShaper.java line 524: > 522: } > 523: > 524: private synchronized MemorySegment getFace() { We are already synchronized via the `faceMap`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309776173 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309775469 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309770631 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309774045 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309772610 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309813499 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1310541406 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1310545668 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309793358 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309791413 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1309810009 From jvernee at openjdk.org Wed Oct 18 20:07:58 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Wed, 18 Oct 2023 20:07:58 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Tue, 29 Aug 2023 22:04:40 GMT, Phil Race wrote: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout src/java.desktop/share/classes/sun/font/HBShaper.java line 310: > 308: SequenceLayout glyphInfosLayout = MemoryLayout.sequenceLayout(maxinfo, GlyphInfoLayout); > 309: codePointHandle = getVarHandle(glyphInfosLayout, "codepoint"); > 310: clusterHandle = getVarHandle(glyphInfosLayout, "cluster"); There are better ways to do this in the latest API, by using the extra offset parameter and `MemoryLayout::scaleHandle`. I suggest changing this to: Suggestion: x_offsetHandle = getVarHandle(PositionLayout, "x_offset"); y_offsetHandle = getVarHandle(PositionLayout, "y_offset"); x_advanceHandle = getVarHandle(PositionLayout, "x_advance"); y_advanceHandle = getVarHandle(PositionLayout, "y_advance"); codePointHandle = getVarHandle(GlyphInfoLayout, "codepoint"); clusterHandle = getVarHandle(GlyphInfoLayout, "cluster"); And then in `getVarHandle`: private static VarHandle getVarHandle(MemoryLayout enclosing, String name) { VarHandle h = layout.varHandle(PathElement.groupElement(name)); // scale offset by the size of 'enclosing' h = MethodHandles.collectCoordinates(h, 1, enclosing.scaleHandle()); /* insert 0 offset so don't need to pass arg every time */ return MethodHandles.insertCoordinates(h, 1, 0L).withInvokeExactBehavior(); } (hope I eyeballed that correctly...) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1361989861 From prr at openjdk.org Wed Oct 18 20:07:59 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:07:59 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> On Tue, 17 Oct 2023 11:50:20 GMT, Jorn Vernee wrote: >> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout > > src/java.desktop/share/classes/sun/font/HBShaper.java line 310: > >> 308: SequenceLayout glyphInfosLayout = MemoryLayout.sequenceLayout(maxinfo, GlyphInfoLayout); >> 309: codePointHandle = getVarHandle(glyphInfosLayout, "codepoint"); >> 310: clusterHandle = getVarHandle(glyphInfosLayout, "cluster"); > > There are better ways to do this in the latest API, by using the extra offset parameter and `MemoryLayout::scaleHandle`. > > I suggest changing this to: > > Suggestion: > > x_offsetHandle = getVarHandle(PositionLayout, "x_offset"); > y_offsetHandle = getVarHandle(PositionLayout, "y_offset"); > x_advanceHandle = getVarHandle(PositionLayout, "x_advance"); > y_advanceHandle = getVarHandle(PositionLayout, "y_advance"); > codePointHandle = getVarHandle(GlyphInfoLayout, "codepoint"); > clusterHandle = getVarHandle(GlyphInfoLayout, "cluster"); > > > And then in `getVarHandle`: > > > private static VarHandle getVarHandle(MemoryLayout enclosing, String name) { > VarHandle h = layout.varHandle(PathElement.groupElement(name)); > // scale offset by the size of 'enclosing' > h = MethodHandles.collectCoordinates(h, 1, enclosing.scaleHandle()); > /* insert 0 offset so don't need to pass arg every time */ > return MethodHandles.insertCoordinates(h, 1, 0L).withInvokeExactBehavior(); > } > > > (hope I eyeballed that correctly...) I've just pushed this change, but I'm unclear why it is "better". It seems more obscure to me. I've added a somewhat expanded comment of what I guess this does to help me and others understand what it does. Please take a look to see if it makes sense. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1362900089 From jvernee at openjdk.org Wed Oct 18 20:08:00 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Wed, 18 Oct 2023 20:08:00 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> References: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> Message-ID: On Tue, 17 Oct 2023 22:53:30 GMT, Phil Race wrote: > I'm unclear why it is "better". It seems more obscure to me. Ok. I think it's better because it doesn't require creating a maximum size sequence layout in order to then make a var handle out of, which is a bit of a hack IMO. One that was required in the previous version of the API. This kind of use-case, where the size of the sequence is not known statically, is one of the reasons why we added the extra base offset parameter to the var handles. Another way of writing this would be to use the base var handle, with its extra leading offset parameter, and then pass e.g. `i * PositionLayout.byteSize()` as the offset at every call site (where `i` is the array index). The two extra combination steps essentially create a var handle with that behavior baked in. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1363114533 From prr at openjdk.org Wed Oct 18 20:08:01 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:08:01 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> Message-ID: On Wed, 18 Oct 2023 03:43:15 GMT, Jorn Vernee wrote: > > I'm unclear why it is "better". It seems more obscure to me. > > Ok. I think it's better because it doesn't require creating a maximum size sequence layout in order to then make a var handle out of, which is a bit of a hack IMO. One that was required in the previous version of the API. Not sure which "previous" that was, but in JDK 21 I did not need to specify a size. The need to do that was something that came in as of JDK 22 and I thought it a bit of a backwards step perhaps motivated to help devs understand the sizes involved but given the arithmetic involved in general I am not sure it was justified. > > This kind of use-case, where the size of the sequence is not known statically, is one of the reasons why we added the extra base offset parameter to the var handles. The previous API dealt with that just fine. And equivalently as far as I can tell. The base offset parameter may have other uses but I need its relevance to this explained to me, > Another way of writing this would be to use the base var handle, with its extra leading offset parameter, and then pass e.g. `i * PositionLayout.byteSize()` as the offset at every call site (where `i` is the array index). The two extra combination steps essentially create a var handle with that behavior baked in. OK, but now you have a VarHandle intended for use on a SequenceLayout (ie array) of Struct and are disguising it for some reason that isn't (sufficiently?) obvious at an API level and definitely isn't obvious at a performance level. Is there some fundamental reason why the 21 API could not internally be reduced to the same ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1363167938 From jvernee at openjdk.org Wed Oct 18 20:08:02 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Wed, 18 Oct 2023 20:08:02 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> Message-ID: On Wed, 18 Oct 2023 04:44:30 GMT, Phil Race wrote: >>> I'm unclear why it is "better". It seems more obscure to me. >> >> Ok. I think it's better because it doesn't require creating a maximum size sequence layout in order to then make a var handle out of, which is a bit of a hack IMO. One that was required in the previous version of the API. >> >> This kind of use-case, where the size of the sequence is not known statically, is one of the reasons why we added the extra base offset parameter to the var handles. >> >> Another way of writing this would be to use the base var handle, with its extra leading offset parameter, and then pass e.g. `i * PositionLayout.byteSize()` as the offset at every call site (where `i` is the array index). The two extra combination steps essentially create a var handle with that behavior baked in. > >> > I'm unclear why it is "better". It seems more obscure to me. >> >> Ok. I think it's better because it doesn't require creating a maximum size sequence layout in order to then make a var handle out of, which is a bit of a hack IMO. One that was required in the previous version of the API. > > Not sure which "previous" that was, but in JDK 21 I did not need to specify a size. > The need to do that was something that came in as of JDK 22 and I thought it a bit of a backwards step perhaps motivated to help devs understand the sizes involved but given the arithmetic involved in general I am not sure it was justified. > >> >> This kind of use-case, where the size of the sequence is not known statically, is one of the reasons why we added the extra base offset parameter to the var handles. > > The previous API dealt with that just fine. And equivalently as far as I can tell. > The base offset parameter may have other uses but I need its relevance to this explained to me, > >> Another way of writing this would be to use the base var handle, with its extra leading offset parameter, and then pass e.g. `i * PositionLayout.byteSize()` as the offset at every call site (where `i` is the array index). The two extra combination steps essentially create a var handle with that behavior baked in. > > OK, but now you have a VarHandle intended for use on a SequenceLayout (ie array) of Struct and are disguising it for some reason that isn't (sufficiently?) obvious at an API level and definitely isn't obvious at a performance level. > Is there some fundamental reason why the 21 API could not internally be reduced to the same ? Requiring users to specify the size of the sequence layout was done in order to dispel the illusion that there was any kind of special handling for a sequence layout created without a size. e.g. if you try to allocate with it, what should happen? Should we detect that this as a special case? Or just crush with an OOME? This is something other users ran into in practice, and removing the size-less factory revealed some latent bugs in the tests as well. So, I feel that overall, dropping the size-less factory was the right move. This was more or less an orthogonal decision to the decision of adding the base offset parameter. The previous JDK 21 API asked users to construct layouts for memory of which they did not know the layout in advance. e.g. when creating a var handle from a sequence layout with the maximum number of elements, the in-memory array that is being accessed is likely not actually an array with the maximum number of elements? The special max element sequence layout is just a workaround used to be able to create an indexed var handle. Another example is a 2-dimensional matrix with a dynamic row and column size. How should this be represented using a memory layout? We can't use the max element sequence layout trick in that case, since the size of the inner sequence affects the scaling of the index for the outer sequence. The core issue is that, to get good performance, a user needs to construct the layout and derive var handles in advance, but at the same time it is not possible to represent a layout with a 'dynamic' size. We went back and forth on ideas in order to add better support for dynamic sizes in the layout API. But in the end, all the things we tried ended up being convoluted, and had their own set of corner cases that were ill-addressed. So, the conclusion we arrived at was that layouts are better left alone, and should only be used to represent memory layouts that are 'static'/fixed and known up front. In that case a user can declare the layout, and all the var handles they need, in advance, and stick them into `static final` fields, which is required to get good performance. But then the question becomes: what about structural access to memory whose layout can _not_ be represented statically? Even in those cases, often there is a part of the structure of the memory layout that is fixed, and part of the layout that is dynamic. The memory layout API can still be used for the fixed part, and then the extra base offset parameter can be used to handle the dynamic part, by injecting external/ad-hoc offset computations into the var handle access. As far as I can tell in this patch, the var handles that are created are for arrays whose size is not known statically, so this would fall into the territory that is address by the extra base offset parameter. That's why I think it is 'better' to use that mechanism. It avoids the need for the max element sequence layout workaround, which, as you found, also became more cumbersome due to the decision to drop the size-less sequence layout factory. At the end of the day, it was just a suggestion. I think you should stick with the version you prefer. (technically the version using the sequence layout adds an extra bounds check, but I think it will be folded away by C2). If the var handle combinator steps look obscure, I think that is a good indicator that we perhaps need an extra `arrayVarHandle` convenience method that does the combination steps. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1363287236 From mcimadamore at openjdk.org Wed Oct 18 20:08:05 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 18 Oct 2023 20:08:05 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: <1KVYxaDDdK5rq9Fs3j6XTGaLuGXS4w8rv0GlPkffQmg=.985e1f57-a82e-4df8-a400-4471502bfd65@github.com> On Tue, 29 Aug 2023 22:04:40 GMT, Phil Race wrote: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout src/java.desktop/share/classes/sun/font/HBShaper.java line 425: > 423: float startY = (float)startPt.getY(); > 424: > 425: MemorySegment matrix = arena.allocateArray(JAVA_FLOAT, mat.length); There should be an overload of `allocateArray` which takes a Java array directly and then copies it off-heap after allocation. In Java 22 this method is called `allocateFrom` and is much more optimized (as it avoids zeroing of memory). But, even in 21, the call to copy seems redundant - you can just use the correct overload of `SegmentAllocator::allocateArray` src/java.desktop/share/classes/sun/font/HBShaper.java line 613: > 611: for (int i=0; i 612: int storei = i + initialCount; > 613: int cluster = (int)clusterHandle.get(glyphInfoArr, i) - offset; All the var handle calls in this loop are not exact - e.g. they use a `int` offset instead of a `long` one. Because of this, the memory access cannot be fully optimized. Adding a cast to `long` on all offsets coordinates yields a significant performance boost. To avoid issues like these, it is recommended to set up the var handle using the `VarHandle::withInvokeExactBehavior` method, which will cause an exception to be thrown in case there's a type mismatch (similar to `MethodHandle::invokeExact`). src/java.desktop/share/native/libfontmanager/HBShaper_Panama.c line 80: > 78: int flags, > 79: int slot, > 80: hb_font_get_nominal_glyph_func_t nominal_fn, It shouldn't be necessary to pass all the functions here. Note that the upcalls are now effectively static (due to the use of scope values). It would be more efficient to create the array of functions once and for all in Java code (either directly, by creating a memory segment and storing all the function pointers in there, or indirectly, by calling the `_hb_jdk_get_font_funcs` native function). But, we don't need to create a function array each time we call the `shape` function (as all the functions in the array are going to be the same after all). If you do that, you can replace all the `_fn` parameters in here with a single function pointer array parameter. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1342570582 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1345600057 PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1342567487 From prr at openjdk.org Wed Oct 18 20:12:52 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:12:52 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: On Tue, 29 Aug 2023 22:04:40 GMT, Phil Race wrote: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout I've added a test, which although it does not check the rendering is correct, it checks that the rendering would be identical in both the JNI and FFM cases. So if it's wrong it would already be wrong. And the test covers multiple scripts and passes on all core platforms (macOS, Windows, Linux) And I've separately manually verified that the rendering is as expected - if you have the fonts available. At this point the code is ready for review for consideration for pushing to JDK 22. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15476#issuecomment-1769241548 PR Comment: https://git.openjdk.org/jdk/pull/15476#issuecomment-1769244133 From prr at openjdk.org Wed Oct 18 20:12:54 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:12:54 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: <6iv2em-LyZx-TkZUB9X-rrjEgcNyfB_W4qga5GZO5Yk=.d9429817-6b70-4e40-b0ce-37f6c76fefc0@github.com> Message-ID: <4DmVPegxpQ1fzHenGMEALSoxy82D3SP84yt_xALc4Ok=.a9f0bc2a-b68c-443c-a528-00b63a2aa86b@github.com> On Wed, 18 Oct 2023 06:16:15 GMT, Jorn Vernee wrote: >>> > I'm unclear why it is "better". It seems more obscure to me. >>> >>> Ok. I think it's better because it doesn't require creating a maximum size sequence layout in order to then make a var handle out of, which is a bit of a hack IMO. One that was required in the previous version of the API. >> >> Not sure which "previous" that was, but in JDK 21 I did not need to specify a size. >> The need to do that was something that came in as of JDK 22 and I thought it a bit of a backwards step perhaps motivated to help devs understand the sizes involved but given the arithmetic involved in general I am not sure it was justified. >> >>> >>> This kind of use-case, where the size of the sequence is not known statically, is one of the reasons why we added the extra base offset parameter to the var handles. >> >> The previous API dealt with that just fine. And equivalently as far as I can tell. >> The base offset parameter may have other uses but I need its relevance to this explained to me, >> >>> Another way of writing this would be to use the base var handle, with its extra leading offset parameter, and then pass e.g. `i * PositionLayout.byteSize()` as the offset at every call site (where `i` is the array index). The two extra combination steps essentially create a var handle with that behavior baked in. >> >> OK, but now you have a VarHandle intended for use on a SequenceLayout (ie array) of Struct and are disguising it for some reason that isn't (sufficiently?) obvious at an API level and definitely isn't obvious at a performance level. >> Is there some fundamental reason why the 21 API could not internally be reduced to the same ? > > Requiring users to specify the size of the sequence layout was done in order to dispel the illusion that there was any kind of special handling for a sequence layout created without a size. e.g. if you try to allocate with it, what should happen? Should we detect that this as a special case? Or just crush with an OOME? This is something other users ran into in practice, and removing the size-less factory revealed some latent bugs in the tests as well. So, I feel that overall, dropping the size-less factory was the right move. This was more or less an orthogonal decision to the decision of adding the base offset parameter. > > The previous JDK 21 API asked users to construct layouts for memory of which they did not know the layout in advance. e.g. when creating a var handle from a sequence layout with the maximum number of elements, the in-memory array that is being accessed is likely not actually an array with the maximum number of elements? The special max element sequence layout is just a workaround used to be able to create an indexed var handle. > > Another example is a 2-dimensional matrix with a dynamic row and column size. How should this be represented using a memory layout? We can't use the max element sequence layout trick in that case, since the size of the inner sequence affects the scaling of the index for the outer sequence. > > The core issue is that, to get good performance, a user needs to construct the layout and derive var handles in advance, but at the same time it is not possible to represent a layout with a 'dynamic' size. We went back and forth on ideas in order to add better support for dynamic sizes in the layout API. But in the end, all the things we tried ended up being convoluted, and had their own set of corner cases that were ill-addressed. > > So, the conclusion we arrived at was that layouts are better left alone, and should only be used to represent memory layouts that are 'static'/fixed and known up front. In that case a user can declare the layout, and all the var handles they need, in advance, and stick them into `static final` fields, which is required to get good performance. > > But then the question becomes: what about structural access to memory whose layout can _not_ be represented statically? Even in those cases, often there is a part of the structure of the memory layout that is fixed, and part of the layout that is dynamic. The memory layout API can still be used for the fixed part, and then the extra base offset parameter can... I feel like I'm starting to learn that once you've got your VarHandle from FFM, you need to head over to java.lang.invoke and hunt around to see what tricks you can do with it. The less I have to do that the better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1364478566 From prr at openjdk.org Wed Oct 18 20:18:47 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:18:47 GMT Subject: RFR: 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913 In-Reply-To: References: Message-ID: On Wed, 18 Oct 2023 13:21:17 GMT, Alexey Ivanov wrote: > Update ProblemList entry for java/awt/PopupMenu/PopupMenuLocation.java to [JDK-8259913](https://bugs.openjdk.org/browse/JDK-8259913) which is a specific bug for AWT menus in High DPI environment. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16246#pullrequestreview-1686062874 From prr at openjdk.org Wed Oct 18 20:22:49 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:22:49 GMT Subject: RFR: JDK-8316030: Update Libpng to 1.6.40 In-Reply-To: References: Message-ID: On Tue, 17 Oct 2023 17:27:45 GMT, Harshitha Onkar wrote: > Libpng updated from 1.6.39 to 1.6.40 > > Build and CI Testing passes on all platforms. A very small update ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16223#pullrequestreview-1686068144 From prr at openjdk.org Wed Oct 18 20:22:48 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:22:48 GMT Subject: RFR: 8318104: macOS 10.13 check in TabButtonAccessibility.m can be removed In-Reply-To: <5g7tLIkofAuSpAXiymjkX_bNZnCJsFM8gUs9bq64Kls=.632e7079-a749-4b7c-b60f-2bd7255351e8@github.com> References: <5g7tLIkofAuSpAXiymjkX_bNZnCJsFM8gUs9bq64Kls=.632e7079-a749-4b7c-b60f-2bd7255351e8@github.com> Message-ID: On Tue, 17 Oct 2023 11:42:40 GMT, Abhishek Kumar wrote: > Since[ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) is integrated to make macOS 11 the minimum version to build jdk, the 10.13 check is not needed and can be removed from TabButtonAccessibility.m file. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16218#pullrequestreview-1686068735 From prr at openjdk.org Wed Oct 18 20:23:48 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:23:48 GMT Subject: RFR: 8318101: Additional test cases for CSSAttributeEqualityBug In-Reply-To: References: Message-ID: <159qDoeEUT4CYc0F7oA-Mw8iULJbnnRFfxMzTtxmXW4=.afc8335a-4f9e-4a10-9c9a-af1e7979051a@github.com> On Fri, 13 Oct 2023 20:21:04 GMT, Alexey Ivanov wrote: > Adds additional test cases to `javax/swing/text/html/CSS/CSSAttributeEqualityBug.java`. > > Currently, CSS parser in Java allows space between the number and the unit or percent. This is what the additional test cases verify. > > There's also one additional case for `border-width: medium`. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16193#pullrequestreview-1686070571 From prr at openjdk.org Wed Oct 18 20:48:46 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:48:46 GMT Subject: RFR: JDK-8316741: fixed BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts I'm not seeing that github shows I approved this but I certainly intended to. So hitting approve now. Oh, maybe its because you have a mismatch in the title. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16002#pullrequestreview-1686113469 From prr at openjdk.org Wed Oct 18 20:53:50 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 20:53:50 GMT Subject: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3] In-Reply-To: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> References: <85ZfCG-OdCBwxjBMMpWcuDglK7gR3ekK6KW5aeMc0kU=.d1c21e15-149d-4c27-923e-93a6aaf176cb@github.com> Message-ID: On Tue, 10 Oct 2023 03:50:11 GMT, Prasanta Sadhukhan wrote: >> A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog >> Fix is to make sure the option pane dialog is always on top.... > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add test I think its more likely to cause bugs than fix them. As I said there are special cases and the Print Dialog is one of them because the app can't easily get a handle to it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16060#issuecomment-1769300673 From prr at openjdk.org Wed Oct 18 21:12:47 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 21:12:47 GMT Subject: RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager [v2] In-Reply-To: References: <5OwD7o3mUCM5PP-oI9VuYyevvuLQaggzfwnkvz8OtGw=.d3d4634a-769f-4a0d-938a-3b6828269952@github.com> Message-ID: On Wed, 11 Oct 2023 02:40:20 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java line 80: >> >>> 78: if (f.isMaximizable()) { >>> 79: if (!f.isMaximum()) { >>> 80: f.setMaximum(true); >> >> So if the new frame is set to maximum=true, don't you need to set the current frame to maximum=false ? >> The way I'm interpreting the class doc. and the comment about "transfer" is that only one frame can be in the maximised state. > > I was interpreting it as transfer the attribute but retain it for current frame....but it seems your interpretation is more logical...so I have updated the PR.. > Since I guess there's no JInternalFrame equivalent in native widget, it leaves scope for interpretation.. > > Now with this fix, in SwingSet2 JInternalFrame demo in WindowsL&F > > - If Frame 0 maximised, it goes to maximised state > - Then when another frame say, Frame 4 maximised, Frame 4 is not restored to un-maximised size but actually been maximised and Frame0 is restored to un-maximised state.. I'm still not sure everything is right. It seems that a frame can have the "maximized" state, even if it is currently iconified. Why ? Well because have this test "if (!currentFrame.isIcon()) {" // (line 77) which we can only reach "currentFrame.isMaximum()" // line 71 I'm wondering if that test at line 77 should be there ? It prevents anything happening if the currently maximised frame is iconified. Doesn't it ? Seems like it shouldn't matter, the new frame "f" should be set to maximum regardless I don't understand that 'special case' comment either. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16097#discussion_r1364538277 From prr at openjdk.org Wed Oct 18 21:49:53 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 18 Oct 2023 21:49:53 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:20:41 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-8314731 : Add support for the alt attribute in the image type input HTML tag](https://bugs.openjdk.java.net/browse/JDK-8314731) >> >> According [HTML 3.2 specification](https://www.w3.org/TR/2018/SPSD-html32-20180315/#input) >> >> `alt` is not an attribute of the `input` element. >> >> According [HTML 4.01 specifications](https://www.w3.org/TR/html4/interact/forms.html#h-17.4) : >> >>> ... For accessibility reasons, authors should provide [alternate text](https://www.w3.org/TR/html4/struct/objects.html#alternate-text) for the image via the [alt](https://www.w3.org/TR/html4/struct/objects.html#adef-alt) attribute. ... >> >> This feature is not implemented in `FormView.java`. >> >> ?? ~~This also affects the HTML 32 DTD~~ >> >> ![Screenshot_20230817_025316](https://github.com/openjdk/jdk/assets/19194678/8e580574-d842-4a65-884b-26e33cd12138) >> >> Left before the patch and right after the patch. >> >> >> import java.awt.BorderLayout; >> import java.awt.Dimension; >> import javax.swing.JEditorPane; >> import javax.swing.JFrame; >> import javax.swing.JScrollPane; >> import javax.swing.SwingUtilities; >> import javax.swing.text.Document; >> import javax.swing.text.html.HTMLEditorKit; >> import javax.swing.text.html.StyleSheet; >> >> public class HTMLAddsSupportAltInputTag { >> public static void main(String[] args) { >> new HTMLAddsSupportAltInputTag(); >> } >> >> public HTMLAddsSupportAltInputTag() { >> SwingUtilities.invokeLater(new Runnable(){ >> public void run(){ >> JEditorPane jEditorPane = new JEditorPane(); >> jEditorPane.setEditable(false); >> JScrollPane scrollPane = new JScrollPane(jEditorPane); >> HTMLEditorKit kit = new HTMLEditorKit(); >> jEditorPane.setEditorKit(kit); >> StyleSheet styleSheet = kit.getStyleSheet(); >> styleSheet.addRule(""" >> body { >> color: #000; >> font-family:times; >> margin: 4px; >> } >> """); >> String htmlString = """ >> >> >> >>

>> > However, JScrollBar overrides getMinimumSize() and breaks this contract - it always returns a minimum size derived from the preferred size even if you have previously called setMinimumSize() > > Fix is made to check if mnimumSize is set and if so, honour it.. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Spec update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15325/files - new: https://git.openjdk.org/jdk/pull/15325/files/9b96c335..09b8b827 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15325&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15325&range=02-03 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15325.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15325/head:pull/15325 PR: https://git.openjdk.org/jdk/pull/15325 From djelinski at openjdk.org Thu Oct 19 11:22:39 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 19 Oct 2023 11:22:39 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v3] In-Reply-To: <_JE8mf3K_y8CH9HAC-pGazLxLJmEvJ6ROosdWqT8g54=.04ae6ec5-bcd6-4299-a645-293dd4450c0d@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> <6zRW3r41DDExVOt_9os56RmfJAvVUOlsZ9hoxvQaNz4=.1113b3bd-2c52-44c1-b610-bffe1d3e243f@github.com> <_MhIVPeS2EGBFhutrAODJHvtARQGVsb6txAd6tWx23U=.b10a5f91-26cf-48b9-b361-f046f96e2c46@github.com> <_JE8mf3K_y8CH9HAC-pGazLxLJmEvJ6ROosdWqT8g54=.04ae6ec5-bcd6-4299-a645-293dd4450c0d@github.com> Message-ID: On Fri, 13 Oct 2023 15:03:30 GMT, Alexey Ivanov wrote: >> Ok, I'll revert the initIDs removals, and will file a follow-up PR once this one is merged. > >> ?will file a follow-up PR once this one is merged > > You can submit it right away, so that we'll not forget about it. Filed [JDK-8318091](https://bugs.openjdk.org/browse/JDK-8318091) for removal of initIDs; the changes there overlap with this PR, and I'd rather not create dependent PRs. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1365335827 From lkorinth at openjdk.org Thu Oct 19 15:16:13 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Oct 2023 15:16:13 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v5] In-Reply-To: References: Message-ID: > Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. > > I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` > > Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: > > /** > * Create ProcessBuilder using the java launcher from the jdk to > * be tested. > * > *

Please observe that you likely should use > * createTestJvm() instead of this method because createTestJvm() > * will add JVM options from "test.vm.opts" and "test.java.opts" > * and this method will not do that. > * > * @param command Arguments to pass to the java command. > * @return The ProcessBuilder instance representing the java command. > */ > > > I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... > > I have run tier 1 testing, and I have started more exhaustive testing. Leo Korinth has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Batch update using sed find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createLimitedJavaTestProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/createTestJvm(/createJavaTestProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createJavaProcessBuilder/import static jdk.test.lib.process.ProcessTools.createLimitedJavaTestProcessBuilder/g" - Merge branch '_master_jdk' into _8315097 - explain usage - Revert "8315097: Rename createJavaProcessBuilder" This reverts commit 4b2d171133c40c5c48114602bfd0d4da75531317. - Revert "copyright" This reverts commit f3418c80cc0d4cbb722ee5e368f1a001e898b43e. - Revert "fix static import" This reverts commit 27da71508aec9a4bec1c0ad07031887286580171. - fix static import - copyright - 8315097: Rename createJavaProcessBuilder ------------- Changes: https://git.openjdk.org/jdk/pull/15452/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=04 Stats: 894 lines in 560 files changed: 34 ins; 10 del; 850 mod Patch: https://git.openjdk.org/jdk/pull/15452.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15452/head:pull/15452 PR: https://git.openjdk.org/jdk/pull/15452 From lkorinth at openjdk.org Thu Oct 19 15:16:42 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Oct 2023 15:16:42 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v4] In-Reply-To: <4pRda3ZAZzVzGiVrDv6LN9Pw__DhrmTm4qZjTHzaq80=.a009bb29-4869-4047-8b62-80fbe7bef692@github.com> References: <4pRda3ZAZzVzGiVrDv6LN9Pw__DhrmTm4qZjTHzaq80=.a009bb29-4869-4047-8b62-80fbe7bef692@github.com> Message-ID: <3XTw5IAFj_YpaMrqyLdO9mNbWDENFMVkwk8JBmKHDcE=.5e4b1c70-0b36-4ff5-9cce-ee4f25a8e3bb@github.com> On Tue, 17 Oct 2023 12:29:46 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with three additional commits since the last revision: > > - Revert "8315097: Rename createJavaProcessBuilder" > > This reverts commit 4b2d171133c40c5c48114602bfd0d4da75531317. > - Revert "copyright" > > This reverts commit f3418c80cc0d4cbb722ee5e368f1a001e898b43e. > - Revert "fix static import" > > This reverts commit 27da71508aec9a4bec1c0ad07031887286580171. If this looks roughly acceptable, I will manually add indentation spaces. I am now running tests. The changes can be verified by running the following commands: git switch -c _reproduce 15acf4b8d7cffcd0d74bf1b9c43cde9acaf31ea9 find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createLimitedJavaTestProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/createTestJvm(/createJavaTestProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createJavaProcessBuilder/import static jdk.test.lib.process.ProcessTools.createLimitedJavaTestProcessBuilder/g" git diff HEAD f80dda8d7109c2ef6bc1f685d0b611704dec645e Only the documentation changes should be visible. When I have manually indented everything it should be easy to that verify that change as a whitespace-only change. But that is for tomorrow (at best). ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1771194189 From dnguyen at openjdk.org Thu Oct 19 16:03:52 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 19 Oct 2023 16:03:52 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v4] In-Reply-To: <3BXS_MjZRqNj22ARdUwdm3nynv6WNLSEI9o2GIVpfGU=.a6a59bf2-9f23-43ce-990a-ccb820426564@github.com> References: <3BXS_MjZRqNj22ARdUwdm3nynv6WNLSEI9o2GIVpfGU=.a6a59bf2-9f23-43ce-990a-ccb820426564@github.com> Message-ID: <5X9UFiEUeGG1n2009C1Oyi27b7n9axZgWQbFKteJCDQ=.383f2418-4e54-4d71-93c0-857ead55f9ee@github.com> On Sat, 14 Oct 2023 14:13:00 GMT, Karl T wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Added string buffer. Separated fail images. Changed exception to throw at the end of test. > > I really wonder why the (10 year old) issue [JDK-8015854](https://bugs.openjdk.org/browse/JDK-8015854) was accepted as bug. ? > It is **not a bug in JDK**, it is a bug in users code. > > He sets the preferred size of the button to 30x30 and adds an HTML image to that button and expects that it is painted centered. > But he ignores (or does not know) that a button has a margin (2,14,2,14 in Metal). > Subtracting the margin from the preferred size results in a view size of 2x26 pixel. > This view is centered withing the component bounds and the HTML image/text is painted left-top aligned in that view. > This paints the HTML image/text out of center, but this is **expected behavior**. > > ![image](https://github.com/openjdk/jdk/assets/5604048/d3501d38-c6ae-4475-be2c-bc3f2973dbd4) > > If the user reduces the preferred size, he also needs to **reduce the margin**. > E.g. adding following line to users code (from JDK-8015854) fixes the problem: > > ~~~java > testButton.setMargin(new Insets(0, 0, 0, 0)); > ~~~ > > ![image](https://github.com/openjdk/jdk/assets/5604048/96e00dad-e673-4598-9147-4702955086c6) > > I would recommend to **revert** this PR and also PR #7310. > Both break compatibility when using HTML text in buttons. Hi @DevCharly, I'll look into this. I see your point on how this sort of goes against expected behavior, knowing the margins are (2, 14, 2, 14). I can distinguish between HTML images and HTML text to resolve this issue somewhat for the unexpected padding, but I think reverting the PRs is also a valid solution. ------------- PR Comment: https://git.openjdk.org/jdk/pull/8407#issuecomment-1771286734 From dnguyen at openjdk.org Thu Oct 19 16:15:08 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 19 Oct 2023 16:15:08 GMT Subject: RFR: JDK-8316030: Update Libpng to 1.6.40 In-Reply-To: References: Message-ID: On Tue, 17 Oct 2023 17:27:45 GMT, Harshitha Onkar wrote: > Libpng updated from 1.6.39 to 1.6.40 > > Build and CI Testing passes on all platforms. Changes look good to me. I left one question for clarification for myself. src/java.desktop/share/native/libsplashscreen/libpng/pngget.c line 60: > 58: if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0) > 59: return(0); > 60: #endif What's this addition doing exactly? ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/16223#pullrequestreview-1688152478 PR Review Comment: https://git.openjdk.org/jdk/pull/16223#discussion_r1365803799 From mcimadamore at openjdk.org Thu Oct 19 17:46:17 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 19 Oct 2023 17:46:17 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout In-Reply-To: References: Message-ID: <8CUOUPGxuQn_6e-KkIccpAmPT4fUdUcEIuu0Mk3uWMY=.3192d026-9a0b-4348-9601-c71bc42d4e31@github.com> On Wed, 18 Oct 2023 23:56:17 GMT, Maurizio Cimadamore wrote: >> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout > > src/java.desktop/share/classes/sun/font/HBShaper.java line 110: > >> 108: >> 109: private static VarHandle getVarHandle(StructLayout struct, String name) { >> 110: VarHandle h = struct.varHandle(PathElement.groupElement(name)); > > Note that, strictly speaking, these combiners are _not_ required. If you just call `MemoryLayout::varHandle`, you get back a var handle that takes a `MemorySegment` and a `long` offset. So, you can, if you want, adapt the var handle so that the offset parameter becomes something else. But you could also just leave the var handle as is. Then, in the loop that is doing the access, you can do this: > > > for (int i = 0 ; i < limit ; i++) { > x_offsetHandle.get(segment, PositionLayout.scale(0, i)); > y_offsetHandle.get(segment, PositionLayout.scale(0, i)); > ... > } > > That is, use the offset hole to your advantage, to pass the struct base offset (obtained by scaling the enclosing struct layout by the value of the loop induction variable). > > (That said, I understand that working with logical indices is a common operation, and that this is made a bit harder by the recent API changes. We should consider, as @JornVernee mentioned, adding back a more general `MemoryLayout::arrayElementVarHandle` which will give you the var handle you need - with coordinates `MemorySegment` and `long` - a logical index, not an offset). A PR which adds `MemoryLayout::arrayElementVarHandle` can be found here: https://github.com/openjdk/jdk/pull/16272 With this, you can call the new method in order to create the var handle. The returned var handle will accept *two* long coordinate - the first is a base offset (as usual), the second in a logical index (what you need). The PR also adds plenty of narrative text describing how access to variable-length arrays should be performed using layouts (and also shows cases where the offset parameter is used in a non-trivial fashion). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1365898029 From javalists at cbfiddle.com Fri Oct 20 02:03:56 2023 From: javalists at cbfiddle.com (Alan Snyder) Date: Thu, 19 Oct 2023 19:03:56 -0700 Subject: Metal renderer threading issues [macOS] In-Reply-To: <34EA3BD1-255D-469C-AC1F-54BEE951D42A@jetbrains.com> References: <7a94dff0-0a70-4e54-c4fc-161db113d53b@oracle.com> <138BBEE8-C2D3-4D64-AB61-C8B4B88B3A18@jetbrains.com> <23E5D171-38A8-43D6-B5D0-88A75B240DAB@cbfiddle.com> <4F517578-8278-4420-A17D-68F40AF4CFDB@cbfiddle.com> <34EA3BD1-255D-469C-AC1F-54BEE951D42A@jetbrains.com> Message-ID: That makes sense. Thanks! Alan > On Oct 17, 2023, at 4:10?AM, Alexey Ushakov wrote: > > Not sure about this particular case but in general the change that we have in our fork allows to have a one CVD thread per display (not per MTLLayer as we have in OpenJDK mainstream). But even this optimization is not enough for my opinion. We are currently working on the change that performs updates without any display link thread (similar to what we have in OGL). The display link approach introduced in the Metal pipeline was kind of a workaround for the missing content artifacts due some flaws in synchronization. I think that after fixing all the synchronization issues we?ll be able to get rid of display link threads completely. > > Best Regards, > Alexey > >> On Oct 14, 2023, at 5:11 PM, Alan Snyder wrote: >> >> >>>> >>>> On Oct 10, 2023, at 3:32 AM, Alexey Ushakov wrote: >>>> >>>> We actually changed this logic in JetBrains Runtime and invoke the CVD api only from one thread but still I see multiple display link threads on M2 machines in some rare cases. So it maybe OS related issue. >>> >> >> Did the change to use a single thread make any difference? >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr at openjdk.org Fri Oct 20 05:16:05 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 20 Oct 2023 05:16:05 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v4] In-Reply-To: References: Message-ID: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Doc update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16068/files - new: https://git.openjdk.org/jdk/pull/16068/files/c236b023..0b1ba9ad Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=02-03 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From abhiscxk at openjdk.org Fri Oct 20 06:14:39 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 20 Oct 2023 06:14:39 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v4] In-Reply-To: References: Message-ID: <-SHtIjDHGVIOp1HwXQHQIqJv47UfgC4yC7Uv60I7tsI=.43a46ee1-f6e0-41cd-8fa6-09f21e01c519@github.com> On Fri, 20 Oct 2023 05:16:05 GMT, Tejesh R wrote: >> Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. >> Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Doc update test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 47: > 45: * @bug 4365952 > 46: * @key headful > 47: * @summary Test to check is File chooser can be Disabled Summary may be changed to "Test to check if JFileChooser can be disabled". test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 49: > 47: * @summary Test to check is File chooser can be Disabled > 48: * @run main FileChooserDisableTest > 49: */ Please add a blank line after this. test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 94: > 92: String currentDirectory = jfc.getCurrentDirectory().toString(); > 93: if (!currentDirectory.equals(defaultDirectory)) { > 94: throw new RuntimeException("File chooser disable failed"); Better to add the failed LAF name also while throwing exception. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1366515773 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1366516612 PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1366512983 From tr at openjdk.org Fri Oct 20 06:50:36 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 20 Oct 2023 06:50:36 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v4] In-Reply-To: <-SHtIjDHGVIOp1HwXQHQIqJv47UfgC4yC7Uv60I7tsI=.43a46ee1-f6e0-41cd-8fa6-09f21e01c519@github.com> References: <-SHtIjDHGVIOp1HwXQHQIqJv47UfgC4yC7Uv60I7tsI=.43a46ee1-f6e0-41cd-8fa6-09f21e01c519@github.com> Message-ID: On Fri, 20 Oct 2023 06:06:23 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Doc update > > test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 94: > >> 92: String currentDirectory = jfc.getCurrentDirectory().toString(); >> 93: if (!currentDirectory.equals(defaultDirectory)) { >> 94: throw new RuntimeException("File chooser disable failed"); > > Better to add the failed LAF name also while throwing exception. I've added print statement mentioning LAF name at line 72. I hope that would be fine? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1366545286 From tr at openjdk.org Fri Oct 20 06:59:12 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 20 Oct 2023 06:59:12 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v5] In-Reply-To: References: Message-ID: > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16068/files - new: https://git.openjdk.org/jdk/pull/16068/files/0b1ba9ad..4773effd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=03-04 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From duke at openjdk.org Fri Oct 20 07:04:55 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 20 Oct 2023 07:04:55 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout Message-ID: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Hi Reviewers, I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. Please review and let me know your suggestions, if any. ------------- Commit messages: - Removed unused package - Added frame dispose - Removed realSync() - Updated function call and added frame dispose - JDK-8169475 : WheelModifier.java fails by timeout Changes: https://git.openjdk.org/jdk/pull/16281/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8169475 Stats: 56 lines in 1 file changed: 37 ins; 9 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/16281.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16281/head:pull/16281 PR: https://git.openjdk.org/jdk/pull/16281 From abhiscxk at openjdk.org Fri Oct 20 07:47:36 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 20 Oct 2023 07:47:36 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v4] In-Reply-To: References: <-SHtIjDHGVIOp1HwXQHQIqJv47UfgC4yC7Uv60I7tsI=.43a46ee1-f6e0-41cd-8fa6-09f21e01c519@github.com> Message-ID: <-dOMxXCqr_8ViLFilD7HM-ZtXUWijZIgjm3S_gEROkA=.b9f4ccb3-5c6e-4d4a-b599-912503a356a6@github.com> On Fri, 20 Oct 2023 06:48:11 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/FileChooserDisableTest.java line 94: >> >>> 92: String currentDirectory = jfc.getCurrentDirectory().toString(); >>> 93: if (!currentDirectory.equals(defaultDirectory)) { >>> 94: throw new RuntimeException("File chooser disable failed"); >> >> Better to add the failed LAF name also while throwing exception. > > I've added print statement mentioning LAF name at line 72. I hope that would be fine? I missed that statement.. looks ok. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16068#discussion_r1366599078 From lkorinth at openjdk.org Fri Oct 20 08:34:35 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 20 Oct 2023 08:34:35 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v5] In-Reply-To: References: Message-ID: On Thu, 19 Oct 2023 15:16:13 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: > > - Batch update using sed > > find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createLimitedJavaTestProcessBuilder(/g" > find -name "*.java" | xargs -n 1 sed -i -e "s/createTestJvm(/createJavaTestProcessBuilder(/g" > find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createJavaProcessBuilder/import static jdk.test.lib.process.ProcessTools.createLimitedJavaTestProcessBuilder/g" > - Merge branch '_master_jdk' into _8315097 > - explain usage > - Revert "8315097: Rename createJavaProcessBuilder" > > This reverts commit 4b2d171133c40c5c48114602bfd0d4da75531317. > - Revert "copyright" > > This reverts commit f3418c80cc0d4cbb722ee5e368f1a001e898b43e. > - Revert "fix static import" > > This reverts commit 27da71508aec9a4bec1c0ad07031887286580171. > - fix static import > - copyright > - 8315097: Rename createJavaProcessBuilder Just ignore what I just pushed, I will have a new version out sorry... ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1772309579 PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1772309992 From tr at openjdk.org Fri Oct 20 09:15:11 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 20 Oct 2023 09:15:11 GMT Subject: RFR: 4365952: Cannot disable JFileChooser [v6] In-Reply-To: References: Message-ID: <1BYrLZcAv2T9vO8CvraYdqhI2VI7SUoV-vVrU71nQq0=.aa46db33-6ccd-462d-86a8-663378881455@github.com> > Invoking `setEnabled(false)` on an instance of `JFileChooser` the sub-components are unaffected since the sub-components didn't set/unset enabled explicitly. The fix address the issue and sets the Enabled flag to each sub-components. Along with setting the property to each sub components, the action listeners like mouseClick(Double too) and scroll actions has to be processed based on enabled/disabled property similar to other components. Since `JFilechooser` implementation varies based on LookAndFeel, the same had to be taken care for affected LookAndFeel also. > Note: `JFrame` being top level container handles frame disable using native method which couldn't be the case for `JFileChooser`. For `showDialog/showOpenDialog/showSaveDialog` the fix could be to set the one the enabled property for created single Dialog. But when an instance of `JFileChooser` is created and added to Frame (Without Dialog been created), disabling the `FileChooser` alone had to be done by handling each sub-components and listeners separately. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16068/files - new: https://git.openjdk.org/jdk/pull/16068/files/4773effd..b3a1e64d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16068&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16068.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16068/head:pull/16068 PR: https://git.openjdk.org/jdk/pull/16068 From lbourges at openjdk.org Fri Oct 20 09:55:29 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Fri, 20 Oct 2023 09:55:29 GMT Subject: RFR: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: <9I37pumeDkXgnOEbRGD_0SXp7iti0VryCCzRdJSyGbY=.7cd8b0f1-b5b1-4e93-8d23-3211f974d573@github.com> On Tue, 10 Oct 2023 21:24:47 GMT, Phil Race wrote: >> For stroked shapes (no Renderer use), the min-join-error check is disabled. >> Added new jtreg test to verify join using pixel counts > > Let me submit a test task to verify. As only @prrace approved, is it enough for me to integrate this PR or I need another reviewer ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1772426250 From dmarkov at openjdk.org Fri Oct 20 10:17:36 2023 From: dmarkov at openjdk.org (Dmitry Markov) Date: Fri, 20 Oct 2023 10:17:36 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 06:59:17 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. Changes requested by dmarkov (Reviewer). test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 173: > 171: test.run(); > 172: } finally { > 173: SwingUtilities.invokeAndWait(test.f::dispose); It would be good to ensure that f is not NULL before dispose. ------------- PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1689703885 PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1366771220 From aivanov at openjdk.org Fri Oct 20 11:05:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 20 Oct 2023 11:05:42 GMT Subject: Integrated: 8318101: Additional test cases for CSSAttributeEqualityBug In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 20:21:04 GMT, Alexey Ivanov wrote: > Adds additional test cases to `javax/swing/text/html/CSS/CSSAttributeEqualityBug.java`. > > Currently, CSS parser in Java allows space between the number and the unit or percent. This is what the additional test cases verify. > > There's also one additional case for `border-width: medium`. This pull request has now been integrated. Changeset: 2c23391d Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/2c23391de76be0994d8367fdfba63a98e9faa63d Stats: 25 lines in 1 file changed: 23 ins; 1 del; 1 mod 8318101: Additional test cases for CSSAttributeEqualityBug Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/16193 From aivanov at openjdk.org Fri Oct 20 11:07:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 20 Oct 2023 11:07:42 GMT Subject: Integrated: 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913 In-Reply-To: References: Message-ID: On Wed, 18 Oct 2023 13:21:17 GMT, Alexey Ivanov wrote: > Update ProblemList entry for java/awt/PopupMenu/PopupMenuLocation.java to [JDK-8259913](https://bugs.openjdk.org/browse/JDK-8259913) which is a specific bug for AWT menus in High DPI environment. This pull request has now been integrated. Changeset: 71c99a0e Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/71c99a0e59ff843d48f1c71fb045186e44f83943 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913 Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/16246 From aivanov at openjdk.org Fri Oct 20 11:46:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 20 Oct 2023 11:46:40 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 06:59:17 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. Please add the `null`-check in the dispose code. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1689854730 From aivanov at openjdk.org Fri Oct 20 11:46:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 20 Oct 2023 11:46:42 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 10:13:40 GMT, Dmitry Markov wrote: > It would be good to ensure that f is not NULL before dispose. I know we're doing it all the time? But is it really relevant? This has been bothering me for a while now? Let's clear things up. If the frame is `null`, something has gone awry. If the test code itself didn't throw the exception, we'll get: Exception in thread "main" java.lang.NullPointerException at WheelModifier.main(WheelModifier.java:173) The bad thing is that any exception thrown from the test itself ? in the `try` block ? gets overridden by the exception thrown from the `finally` block. Thus, we get the same exception as above. The overall result is that the test fails, yet it may hide the real reason, which makes it harder to analyse the root cause of the failure. Taking into account the above, *`null`-check is good even though it makes the code longer.* ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1366862441 From honkar at openjdk.org Fri Oct 20 17:39:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 20 Oct 2023 17:39:40 GMT Subject: RFR: JDK-8316030: Update Libpng to 1.6.40 In-Reply-To: References: Message-ID: On Thu, 19 Oct 2023 16:11:41 GMT, Damon Nguyen wrote: >> Libpng updated from 1.6.39 to 1.6.40 >> >> Build and CI Testing passes on all platforms. > > src/java.desktop/share/native/libsplashscreen/libpng/pngget.c line 60: > >> 58: if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0) >> 59: return(0); >> 60: #endif > > What's this addition doing exactly? This is an upstream issue. Details about the issue and fix is available on libpng source repo. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16223#discussion_r1367320826 From honkar at openjdk.org Fri Oct 20 17:39:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 20 Oct 2023 17:39:41 GMT Subject: Integrated: JDK-8316030: Update Libpng to 1.6.40 In-Reply-To: References: Message-ID: On Tue, 17 Oct 2023 17:27:45 GMT, Harshitha Onkar wrote: > Libpng updated from 1.6.39 to 1.6.40 > > Build and CI Testing passes on all platforms. This pull request has now been integrated. Changeset: 158293d2 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/158293d2517695f8c5eaca1b46ecf0f1f9f09691 Stats: 246 lines in 11 files changed: 89 ins; 82 del; 75 mod 8316030: Update Libpng to 1.6.40 Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/16223 From dnguyen at openjdk.org Fri Oct 20 18:47:37 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 20 Oct 2023 18:47:37 GMT Subject: RFR: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: <0XLts08MKi3tRcbZNHzCCSkQHX__cRdXMpeWv2x3uOE=.e1162011-da1d-4f93-9972-e07c310e2dfe@github.com> On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts Changes look reasonable and the test looks good. Ran it myself and it passes with the changes. test/jdk/sun/java2d/marlin/TestCreateStrokedShapeJoins.java line 39: > 37: */ > 38: public class TestCreateStrokedShapeJoins { > 39: Suggestion: /* * @test * @bug 8316741 * @summary Verifies that Marlin renderer's Stroker generates properly joins * in createStrokedShape() * @run main TestCreateStrokedShapeJoins */ public class TestCreateStrokedShapeJoins { test/jdk/sun/java2d/marlin/TestCreateStrokedShapeJoins.java line 44: > 42: private final static int W = 200; > 43: > 44: private final static int[] REF_COUNTS = new int[]{4561, 4790, 5499}; Suggestion: private final static int[] REF_COUNTS = new int[] {4561, 4790, 5499}; test/jdk/sun/java2d/marlin/TestCreateStrokedShapeJoins.java line 47: > 45: > 46: public static void main(String[] args) throws Exception { > 47: final int[] test = new int[]{ Suggestion: final int[] test = new int[] { ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/16002#pullrequestreview-1690675540 PR Review Comment: https://git.openjdk.org/jdk/pull/16002#discussion_r1367348124 PR Review Comment: https://git.openjdk.org/jdk/pull/16002#discussion_r1367379410 PR Review Comment: https://git.openjdk.org/jdk/pull/16002#discussion_r1367379573 From dnguyen at openjdk.org Fri Oct 20 18:47:39 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 20 Oct 2023 18:47:39 GMT Subject: RFR: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Tue, 10 Oct 2023 21:24:47 GMT, Phil Race wrote: >> For stroked shapes (no Renderer use), the min-join-error check is disabled. >> Added new jtreg test to verify join using pixel counts > > Let me submit a test task to verify. > As only @prrace approved, is it enough for me to integrate this PR or I need another reviewer ? @bourgesl I have additionally approved it to make that decision easier. Typically, two Reviewers is recommended unless it's a really trivial change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16002#issuecomment-1773224106 From prr at openjdk.org Fri Oct 20 21:42:35 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 20 Oct 2023 21:42:35 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 11:42:03 GMT, Alexey Ivanov wrote: >> test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 173: >> >>> 171: test.run(); >>> 172: } finally { >>> 173: SwingUtilities.invokeAndWait(test.f::dispose); >> >> It would be good to ensure that f is not NULL before dispose. > >> It would be good to ensure that f is not NULL before dispose. > > I know we're doing it all the time? But is it really relevant? > > This has been bothering me for a while now? Let's clear things up. > > If the frame is `null`, something has gone awry. If the test code itself didn't throw the exception, we'll get: > > > Exception in thread "main" java.lang.NullPointerException > at WheelModifier.main(WheelModifier.java:173) > > > The bad thing is that any exception thrown from the test itself ? in the `try` block ? gets overridden by the exception thrown from the `finally` block. Thus, we get the same exception as above. > > The overall result is that the test fails, yet it may hide the real reason, which makes it harder to analyse the root cause of the failure. > > Taking into account the above, *`null`-check is good even though it makes the code longer.* Yes, if we have a null frame, I'd like to think that there's already an exception thrown by a well written test, and a finally block isn't normally the place you'd want to have an accidental exception generated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1367502914 From prr at openjdk.org Fri Oct 20 22:21:52 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 20 Oct 2023 22:21:52 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: References: Message-ID: <_2riFYCWmZvQAl7zV2jt1ek3QWC0esnzx5s5DduGq6A=.1b4d7899-749b-40d1-be14-0f6c49d8903b@github.com> On Fri, 13 Oct 2023 07:50:17 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: > > - Merge master > - CSS.java : > - Update source code declaration in documentation comments and specifications. > - Typo in an argument. > - MissingColorNames.java : > - Catches the Color Illegal Argument Exception and appends it to the result summary. > - Uncomments rgb tests. > - MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. > - Merge master > - MissingColorNames.java : > - Add a subset of RGB and RGBA tests. > - MissingColorNames.java : > - rename the list of string test. > > CSS.java : > - correct a wrong index. > - MissingColorNames.java : Adds a subset of hexadecimal tests. > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf I'm testing the change as is, results TBD but there are few things to be updated here. src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1029: > 1027: * functions > 1028: * > 1029: * as specified by the CSS Color Module Level 4. Since this PR : https://github.com/openjdk/jdk/pull/13360/files We have the new {@spec .. } tag whereever we reference an external spec. So you should add it here too. test/jdk/javax/swing/text/html/CSS/Hex3468DigitsColor.java line 39: > 37: StringBuilder result = new StringBuilder(); > 38: boolean passed = true; > 39: StyleSheet styleSheet = new StyleSheet(); The MissingColorNames test makes this one look very sparse. can we please cover all the supported patterns and have negative tests too. ------------- Changes requested by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/9825#pullrequestreview-1690955680 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1367520231 PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1367520708 From prr at openjdk.org Fri Oct 20 22:21:53 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 20 Oct 2023 22:21:53 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: <_2riFYCWmZvQAl7zV2jt1ek3QWC0esnzx5s5DduGq6A=.1b4d7899-749b-40d1-be14-0f6c49d8903b@github.com> References: <_2riFYCWmZvQAl7zV2jt1ek3QWC0esnzx5s5DduGq6A=.1b4d7899-749b-40d1-be14-0f6c49d8903b@github.com> Message-ID: On Fri, 20 Oct 2023 22:12:29 GMT, Phil Race wrote: >> ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: >> >> - Merge master >> - CSS.java : >> - Update source code declaration in documentation comments and specifications. >> - Typo in an argument. >> - MissingColorNames.java : >> - Catches the Color Illegal Argument Exception and appends it to the result summary. >> - Uncomments rgb tests. >> - MissingColorNames.java : >> - Rename the color which doesn't belong to CSS-COLOR-4 specification. >> - Merge master >> - MissingColorNames.java : >> - Add a subset of RGB and RGBA tests. >> - MissingColorNames.java : >> - rename the list of string test. >> >> CSS.java : >> - correct a wrong index. >> - MissingColorNames.java : Adds a subset of hexadecimal tests. >> - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color >> >> # Conflicts: >> # src/java.desktop/share/classes/javax/swing/text/html/CSS.java >> - Merge master >> - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf > > src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1029: > >> 1027: * functions >> 1028: * >> 1029: * as specified by the CSS Color Module Level 4. > > Since this PR : https://github.com/openjdk/jdk/pull/13360/files > We have the new {@spec .. } tag whereever we reference an external spec. > So you should add it here too. Also, I think that in the public class doc of CSS.java which talks about CSS1, you need to add a comment "Additionally, the color strings from CSS 4 are supported" and again point to the spec. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1367522765 From prr at openjdk.org Fri Oct 20 22:50:51 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 20 Oct 2023 22:50:51 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v2] In-Reply-To: References: Message-ID: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits: - Merge remote-tracking branch 'upstream/master' into harfbuzz_panama Merge - remove tailing white space - use scaling - Fix windows build, remove perf. logging - Add test, fix bug - use allocateFrom - add offset param - suppressed restricted warnings, now builds but not running yet - Adapt to changed API for FFM final - Merge - ... and 8 more: https://git.openjdk.org/jdk/compare/af2f4bfa...984a8780 ------------- Changes: https://git.openjdk.org/jdk/pull/15476/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=01 Stats: 1374 lines in 7 files changed: 1372 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15476.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15476/head:pull/15476 PR: https://git.openjdk.org/jdk/pull/15476 From prr at openjdk.org Fri Oct 20 23:03:50 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 20 Oct 2023 23:03:50 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v3] In-Reply-To: References: Message-ID: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request incrementally with one additional commit since the last revision: Use new arrayElementVarHandle method ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15476/files - new: https://git.openjdk.org/jdk/pull/15476/files/984a8780..2f759caf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15476.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15476/head:pull/15476 PR: https://git.openjdk.org/jdk/pull/15476 From lbourges at openjdk.org Sat Oct 21 09:13:00 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Sat, 21 Oct 2023 09:13:00 GMT Subject: RFR: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes [v2] In-Reply-To: References: Message-ID: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts Laurent Bourg?s has updated the pull request incrementally with one additional commit since the last revision: fixed 2 missing white spaces ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16002/files - new: https://git.openjdk.org/jdk/pull/16002/files/97d33874..9de63196 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16002&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16002&range=00-01 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/16002.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16002/head:pull/16002 PR: https://git.openjdk.org/jdk/pull/16002 From lbourges at openjdk.org Sat Oct 21 09:13:00 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Sat, 21 Oct 2023 09:13:00 GMT Subject: RFR: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes [v2] In-Reply-To: <0XLts08MKi3tRcbZNHzCCSkQHX__cRdXMpeWv2x3uOE=.e1162011-da1d-4f93-9972-e07c310e2dfe@github.com> References: <0XLts08MKi3tRcbZNHzCCSkQHX__cRdXMpeWv2x3uOE=.e1162011-da1d-4f93-9972-e07c310e2dfe@github.com> Message-ID: <3yHElmZd9jETkJPXRruxVjIlQxew_Z7YNa3vo-uGxg4=.120c29a5-c831-4f1f-af6e-1632f831a8fd@github.com> On Fri, 20 Oct 2023 18:05:19 GMT, Damon Nguyen wrote: >> Laurent Bourg?s has updated the pull request incrementally with one additional commit since the last revision: >> >> fixed 2 missing white spaces > > test/jdk/sun/java2d/marlin/TestCreateStrokedShapeJoins.java line 39: > >> 37: */ >> 38: public class TestCreateStrokedShapeJoins { >> 39: > > Suggestion: > > > /* > * @test > * @bug 8316741 > * @summary Verifies that Marlin renderer's Stroker generates properly joins > * in createStrokedShape() > * @run main TestCreateStrokedShapeJoins > */ > > public class TestCreateStrokedShapeJoins { javadoc as usual -> no ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16002#discussion_r1367694377 From lbourges at openjdk.org Sat Oct 21 09:15:38 2023 From: lbourges at openjdk.org (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Sat, 21 Oct 2023 09:15:38 GMT Subject: Integrated: JDK-8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes In-Reply-To: References: Message-ID: On Sun, 1 Oct 2023 20:33:54 GMT, Laurent Bourg?s wrote: > For stroked shapes (no Renderer use), the min-join-error check is disabled. > Added new jtreg test to verify join using pixel counts This pull request has now been integrated. Changeset: a876beb6 Author: Laurent Bourg?s URL: https://git.openjdk.org/jdk/commit/a876beb63d5d509b80366139ae4c6abe502efe1e Stats: 137 lines in 5 files changed: 118 ins; 1 del; 18 mod 8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/16002 From duke at openjdk.org Mon Oct 23 03:28:00 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 23 Oct 2023 03:28:00 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v2] In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Added null check before frame dispose ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16281/files - new: https://git.openjdk.org/jdk/pull/16281/files/c1d7cfd1..2ef843df Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16281.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16281/head:pull/16281 PR: https://git.openjdk.org/jdk/pull/16281 From duke at openjdk.org Mon Oct 23 03:28:00 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 23 Oct 2023 03:28:00 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 06:59:17 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. @prrace , @dmarkov20 and @aivanov-jdk Thank you very much for your reviews and valuable comments. I have added null check before frame dispose. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16281#issuecomment-1774371625 From jwaters at openjdk.org Mon Oct 23 07:11:55 2023 From: jwaters at openjdk.org (Julian Waters) Date: Mon, 23 Oct 2023 07:11:55 GMT Subject: RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v8] In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. Julian Waters has updated the pull request incrementally with one additional commit since the last revision: Don't use permissive- in flags-cflags.m4 for now ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15096/files - new: https://git.openjdk.org/jdk/pull/15096/files/15ae2781..0566de0c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=06-07 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15096/head:pull/15096 PR: https://git.openjdk.org/jdk/pull/15096 From duke at openjdk.org Mon Oct 23 08:54:39 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 23 Oct 2023 08:54:39 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 12:41:10 GMT, Alexey Ivanov wrote: >> ScientificWare has updated the pull request incrementally with one additional commit since the last revision: >> >> Update src/java.desktop/share/classes/javax/swing/text/html/FormView.java >> >> FormView.java : Remove a redundant space. >> >> Co-authored-by: Andrey Turbanov > > src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 285: > >> 283: button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt); >> 284: } catch (MalformedURLException e) { >> 285: button = new JButton(srcAtt); > > Suggestion: > > button = new JButton(altAtt); > > If `altAtt` is provided, it should be used to handle invalid `srcAtt` too. @aivanov-jdk My apologies, I forgot to reply. I wanted to distinguish the two cases : (Missing resource or bad resource name) and malformed URL. Like in the previous example I gave. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1368333198 From aivanov at openjdk.org Mon Oct 23 12:06:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 12:06:39 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 12:41:10 GMT, Alexey Ivanov wrote: >> ScientificWare has updated the pull request incrementally with one additional commit since the last revision: >> >> Update src/java.desktop/share/classes/javax/swing/text/html/FormView.java >> >> FormView.java : Remove a redundant space. >> >> Co-authored-by: Andrey Turbanov > > src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 285: > >> 283: button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt); >> 284: } catch (MalformedURLException e) { >> 285: button = new JButton(srcAtt); > > Suggestion: > > button = new JButton(altAtt); > > If `altAtt` is provided, it should be used to handle invalid `srcAtt` too. > @aivanov-jdk My apologies, I forgot to reply. I wanted to distinguish the two cases : (Missing resource or bad resource name) and malformed URL. Like in the previous example I gave. What purpose does this distinction serve? It could give an additional insight to the app developer. At the same time, the app developer should ensure the image loads. Does the user of the app care about it [the distinction]? Unlikely. The end result is the image isn't loaded. As HTML specifies, the `alt` attribute contains the image description, which is more useful to the user in _all_ the cases where the image failed to load. Therefore I think you should fallback to `altAtt` if it's provided. This actually raises another question: what if `altAtt` isn't provided? Should it fallback to `srcURL`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1368554059 From aivanov at openjdk.org Mon Oct 23 12:27:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 12:27:43 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 12:12:23 GMT, Alexey Ivanov wrote: > You should probably pass `altAtt` as the `description` parameter, yet I'm unsure if it's ever used in this context. As I say, I'm unsure if it's used? The description could be exposed to Accessibility API. By default, `ImageIcon` uses the URL as the description if it isn't provided: https://github.com/openjdk/jdk/blob/99de9bb83ff70fe81c89751516a86a94c8f552be/src/java.desktop/share/classes/javax/swing/ImageIcon.java#L231-L233 Now that you handle the `alt` attribute, you can pass the description if it's provided. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1368559705 From aivanov at openjdk.org Mon Oct 23 12:27:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 12:27:40 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:20:41 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-8314731 : Add support for the alt attribute in the image type input HTML tag](https://bugs.openjdk.java.net/browse/JDK-8314731) >> >> According [HTML 3.2 specification](https://www.w3.org/TR/2018/SPSD-html32-20180315/#input) >> >> `alt` is not an attribute of the `input` element. >> >> According [HTML 4.01 specifications](https://www.w3.org/TR/html4/interact/forms.html#h-17.4) : >> >>> ... For accessibility reasons, authors should provide [alternate text](https://www.w3.org/TR/html4/struct/objects.html#alternate-text) for the image via the [alt](https://www.w3.org/TR/html4/struct/objects.html#adef-alt) attribute. ... >> >> This feature is not implemented in `FormView.java`. >> >> ?? ~~This also affects the HTML 32 DTD~~ >> >> ![Screenshot_20230817_025316](https://github.com/openjdk/jdk/assets/19194678/8e580574-d842-4a65-884b-26e33cd12138) >> >> Left before the patch and right after the patch. >> >> >> import java.awt.BorderLayout; >> import java.awt.Dimension; >> import javax.swing.JEditorPane; >> import javax.swing.JFrame; >> import javax.swing.JScrollPane; >> import javax.swing.SwingUtilities; >> import javax.swing.text.Document; >> import javax.swing.text.html.HTMLEditorKit; >> import javax.swing.text.html.StyleSheet; >> >> public class HTMLAddsSupportAltInputTag { >> public static void main(String[] args) { >> new HTMLAddsSupportAltInputTag(); >> } >> >> public HTMLAddsSupportAltInputTag() { >> SwingUtilities.invokeLater(new Runnable(){ >> public void run(){ >> JEditorPane jEditorPane = new JEditorPane(); >> jEditorPane.setEditable(false); >> JScrollPane scrollPane = new JScrollPane(jEditorPane); >> HTMLEditorKit kit = new HTMLEditorKit(); >> jEditorPane.setEditorKit(kit); >> StyleSheet styleSheet = kit.getStyleSheet(); >> styleSheet.addRule(""" >> body { >> color: #000; >> font-family:times; >> margin: 4px; >> } >> """); >> String htmlString = """ >> >> >> >>

>> > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. In general, it looks good. The number of exports has reduced. However, I identified several more exports which don't seem to be used: * `Region_CountIterationRects` * `SurfaceData_IntersectBoundsXYWH` * `mul8table` Could you please verify? In addition to the above, I found a couple of weird cases? * `AWTIsHeadless`: it's defined in `libawt/windows/awt_Toolkit.cpp` as well as in `unix/native/libawt/awt/awt_LoadLibrary.c`. It is exported from `awt.dll` and `libawt.so`. It looks as if its export can be removed from `awt.dll`. It is also exported from `libawt.so` and it's used from `libawt_xawt.so`. * `jvm`: I think it was discussed already. I see it' exported from `libawt.so`, it is imported by `libawt_xawt.so` and `libawt_headless.so`. Or do I misunderstand the split? Is `libawt.so` the common code for both `libawt_xawt.so` and `libawt_headless.so` where the former is headful and the latter is headless? ------------- PR Review: https://git.openjdk.org/jdk/pull/13261#pullrequestreview-1692916643 From aivanov at openjdk.org Mon Oct 23 15:58:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 15:58:39 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:20:41 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-8314731 : Add support for the alt attribute in the image type input HTML tag](https://bugs.openjdk.java.net/browse/JDK-8314731) >> >> According [HTML 3.2 specification](https://www.w3.org/TR/2018/SPSD-html32-20180315/#input) >> >> `alt` is not an attribute of the `input` element. >> >> According [HTML 4.01 specifications](https://www.w3.org/TR/html4/interact/forms.html#h-17.4) : >> >>> ... For accessibility reasons, authors should provide [alternate text](https://www.w3.org/TR/html4/struct/objects.html#alternate-text) for the image via the [alt](https://www.w3.org/TR/html4/struct/objects.html#adef-alt) attribute. ... >> >> This feature is not implemented in `FormView.java`. >> >> ?? ~~This also affects the HTML 32 DTD~~ >> >> ![Screenshot_20230817_025316](https://github.com/openjdk/jdk/assets/19194678/8e580574-d842-4a65-884b-26e33cd12138) >> >> Left before the patch and right after the patch. >> >> >> import java.awt.BorderLayout; >> import java.awt.Dimension; >> import javax.swing.JEditorPane; >> import javax.swing.JFrame; >> import javax.swing.JScrollPane; >> import javax.swing.SwingUtilities; >> import javax.swing.text.Document; >> import javax.swing.text.html.HTMLEditorKit; >> import javax.swing.text.html.StyleSheet; >> >> public class HTMLAddsSupportAltInputTag { >> public static void main(String[] args) { >> new HTMLAddsSupportAltInputTag(); >> } >> >> public HTMLAddsSupportAltInputTag() { >> SwingUtilities.invokeLater(new Runnable(){ >> public void run(){ >> JEditorPane jEditorPane = new JEditorPane(); >> jEditorPane.setEditable(false); >> JScrollPane scrollPane = new JScrollPane(jEditorPane); >> HTMLEditorKit kit = new HTMLEditorKit(); >> jEditorPane.setEditorKit(kit); >> StyleSheet styleSheet = kit.getStyleSheet(); >> styleSheet.addRule(""" >> body { >> color: #000; >> font-family:times; >> margin: 4px; >> } >> """); >> String htmlString = """ >> >> >> >>

>> [ rgb(12 24 200 / 82%) wrong RGB code ] expected d10c18c8, returned ff0c18c8 -> [ rgb(12 24 200 / 0.82) wrong RGB code ] expected d10c18c8, returned ff0c18c8 -> [ rgb(12 24 200 / -210) wrong RGB code ] expected 000c18c8, returned ff0c18c8 -> [ rgb(15% 60% 49%) wrong RGB code ] expected ff26997d, returned ff26997c -> [ rgb(15% 60% 49% / 82%) wrong RGB code ] expected d126997d, returned ff26997c -> [ rgb(15%, 60%, 49% / 82%) wrong RGB code ] expected d126997d, returned ff26997c -> [ rgb(0.14 60% 52.3 / 0.98) wrong RGB code ] expected fa009934, returned ff009934 -> [ rgb(none none none / none) wrong RGB code ] expected 00000000, returned ff000000 -> [ rgb(none none none/none) wrong RGB code ] expected 00000000, returned ff000000 -> [ rgb(none none 30) wrong RGB code ] expected ff00001e, returned ff1e0000 -> [ rgb(none 20 none) wrong RGB code ] expected ff001400, returned ff140000 -> [ rgb(10 50 13% / 50%) wrong RGB code ] expected 800a3221, returned ff0a3221 -> [ rgb(10 50 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(10 50,, 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(10 50 ,, 13% // 50%) wrong RGB code ] expected ff000000, returned ff0a3221 -> [ rgb(1.2e1 0.24e2 2e2) wrong RGB code ] expected ff0c18c8, returned ff010100 -> [ rgb(1200e-2 2400e-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgb(1200E-2 2400E-2 200000E-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgb(120560.64646464632469823160676064670646798706406464098706464097970906464067e-4 2400E-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ffff00ff -> [ rgba(12 24 200) wrong RGB code ] expected ff0c18c8, returned c18c8 -> [ rgba(12 24 200%) wrong RGB code ] expected ff0c18ff, returned c18ff -> [ rgba(-1 24 200%) wrong RGB code ] expected ff0018ff, returned 18ff -> [ rgba(300 24 28) wrong RGB code ] expected ffff181c, returned ff181c +> [ rgba(12 24 200 / 82%) illegal argument ] d10c18c8 Color parameter outside of expected range: Alpha -> [ rgba(12, 24, 200) wrong RGB code ] expected ff0c18c8, returned c18c8 +> [ rgba(12, 24, 200, 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12, 24, 200 , 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12 , 24 , 200 , 210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba( 12 , 24 , 200 , 210 ) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12 ,24, 200 ,210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha +> [ rgba(12,24,200,210) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha -> [ rgba(15% 60% 49%) wrong RGB code ] expected ff26997d, returned 26997d +> [ rgba(15% 60% 49% / 82%) illegal argument ] d126997d Color parameter outside of expected range: Alpha +> [ rgba(15%, 60%, 49% / 82%) illegal argument ] d126997d Color parameter outside of expected range: Alpha -> [ rgba(none none none) wrong RGB code ] expected ff000000, returned 0 -> [ rgba(none none 30) wrong RGB code ] expected ff00001e, returned 1e0000 -> [ rgba(none 20 none) wrong RGB code ] expected ff001400, returned 140000 -> [ rgba(10 none none) wrong RGB code ] expected ff0a0000, returned a0000 -> [ rgba(none none none) wrong RGB code ] expected ff000000, returned 0 +> [ rgba(10 50 13% / 50%) illegal argument ] 800a3221 Color parameter outside of expected range: Alpha +> [ rgba(10 50 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(10 50,, 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(10 50 ,, 13% // 50%) illegal argument ] ff000000 Color parameter outside of expected range: Alpha +> [ rgba(1.2e1 0.24e2 2e2) illegal argument ] ff0c18c8 Color parameter outside of expected range: Alpha -> [ rgba(1200e-2 2400e-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ff00ff -> [ rgba(1200E-2 2400E-2 200000E-3) wrong RGB code ] expected ff0c18c8, returned ff00ff -> [ rgba(120560.64646464632469823160676064670646798706406464098706464097970906464067e-4 2400E-2 200000e-3) wrong RGB code ] expected ff0c18c8, returned ff00ff at MissingColorNames.main(MissingColorNames.java:70) ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1775572909 From aivanov at openjdk.org Mon Oct 23 16:42:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 16:42:39 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: <7UKjV7-act6HtuxhEedhpIwHL1Rbk7Ft7yaQfwNpsAA=.fa61f320-4090-4e2f-8305-78c930bb54c4@github.com> On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. > * `AWTIsHeadless`: it's defined in `libawt/windows/awt_Toolkit.cpp` as well as in `unix/native/libawt/awt/awt_LoadLibrary.c`. It is exported from `awt.dll` and `libawt.so`. *It looks as if ~~its~~ this export can be removed from `awt.dll`*. It is also exported from `libawt.so` and it's used from `libawt_xawt.so`. I am not suggesting addressing it here, I'd rather take it to another issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1775590943 From jdv at openjdk.org Mon Oct 23 16:51:53 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 23 Oct 2023 16:51:53 GMT Subject: RFR: 8318100: Remove redundant check for Metal support Message-ID: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> We have updated minimum macOS version on which JDK can be used to macOS 11 and we have check to enable metal pipeline only when macOS version is >=10.14. Since minimum macOS version is updated we don't need this check now. Removed redundant check and ran all clientlibs tests on CI for verification. Also ran a sample program with different combination of sun.java2d.metal and sun.java2d.opengl flags and i see that appropriate pipeline is getting selected. ------------- Commit messages: - 8318100: Remove redundant check for Metal support Changes: https://git.openjdk.org/jdk/pull/16316/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16316&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318100 Stats: 40 lines in 3 files changed: 0 ins; 39 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16316.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16316/head:pull/16316 PR: https://git.openjdk.org/jdk/pull/16316 From djelinski at openjdk.org Mon Oct 23 17:05:30 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Mon, 23 Oct 2023 17:05:30 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. Thanks for your comments! > I identified several more exports which don't seem to be used: I'm not sure about removing functions from a family; `Region_CountIterationRects` can be hidden, but `Region_NextIteration` can not. Similarly, `SurfaceData_IntersectBoundsXYWH` can be hidden, but not `SurfaceData_IntersectBoundsXYXY`. And again, `mul8table` can be hidden but not `div8table`. I'd rather have a separate PR for them, if we decide we should hide them. > `AWTIsHeadless` This one is interesting. Looks like the Windows symbol is not used anywhere (not even inside awt.dll) and could be removed entirely. I can do it in a separate PR. > `jvm` That's an odd beast; it is used to retrieve a pointer to JNIEnv. The pointer to JNIEnv is available in all JNI functions, so we could do without a global jvm variable. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1775631229 From aivanov at openjdk.org Mon Oct 23 17:25:32 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 17:25:32 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. Approved. Further clean-up will be handled separately. I agree. Yet if they're unused from outside, there's no need to export them. After all, you hid some functions from `GrPrim_*` family. A separate PR will do. > > `jvm` > > That's an odd beast; it is used to retrieve a pointer to JNIEnv. The pointer to JNIEnv is available in all JNI functions, so we could do without a global jvm variable. Yes, it's possible to do without it. I believe it's primarily used for up-calls. Anyway, it's not something to address here. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/13261#pullrequestreview-1693101493 PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1775662294 From serb at openjdk.org Mon Oct 23 17:28:37 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 23 Oct 2023 17:28:37 GMT Subject: RFR: 8318100: Remove redundant check for Metal support In-Reply-To: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> References: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> Message-ID: <5bTDtWyT7qZIa3eD9aEF-tVFa5lepXdNcLSpMyUI7zk=.26dd8fee-51c4-4705-8ad4-7bea599cc054@github.com> On Mon, 23 Oct 2023 16:46:24 GMT, Jayathirth D V wrote: > We have updated minimum macOS version on which JDK can be used to macOS 11 and we have check to enable metal pipeline only when macOS version is >=10.14. > > Since minimum macOS version is updated we don't need this check now. > Removed redundant check and ran all clientlibs tests on CI for verification. > Also ran a sample program with different combination of sun.java2d.metal and sun.java2d.opengl flags and i see that appropriate pipeline is getting selected. Just wonder how the the java will work on 10.xx after JDK-8317970 integration, it will fail to start? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16316#issuecomment-1775673532 From duke at openjdk.org Mon Oct 23 17:46:52 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 23 Oct 2023 17:46:52 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 07:50:17 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: > > - Merge master > - CSS.java : > - Update source code declaration in documentation comments and specifications. > - Typo in an argument. > - MissingColorNames.java : > - Catches the Color Illegal Argument Exception and appends it to the result summary. > - Uncomments rgb tests. > - MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. > - Merge master > - MissingColorNames.java : > - Add a subset of RGB and RGBA tests. > - MissingColorNames.java : > - rename the list of string test. > > CSS.java : > - correct a wrong index. > - MissingColorNames.java : Adds a subset of hexadecimal tests. > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf The test fails because the content of JDK-8294090 https://github.com/openjdk/jdk/pull/15262 has not been merged into this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1775698954 From aivanov at openjdk.org Mon Oct 23 17:48:37 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 17:48:37 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v2] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Mon, 23 Oct 2023 03:28:00 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. >> Please review and let me know your suggestions, if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Added null check before frame dispose The updated test failed once on Linux when I ran the test on Friday, the exception was: Exception: java.lang.RuntimeException: Didn't receive focus in time Today I also got a few failures in 8u: Exception: java.lang.RuntimeException: Mouse is not pressed on Linux and on Windows. The good thing is that failure takes about 10 seconds instead of more than 5 minutes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16281#issuecomment-1775706452 From aivanov at openjdk.org Mon Oct 23 17:53:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 17:53:41 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v2] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: <8MWxxn7lS_bGTa7jYJ2Ju6bg-r_7UmeOwRXLgy0q07A=.0259af0f-8a81-4ad0-8ebd-6433249d117c@github.com> On Mon, 23 Oct 2023 03:28:00 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. >> Please review and let me know your suggestions, if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Added null check before frame dispose Changes requested by aivanov (Reviewer). test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 141: > 139: r.mouseMove(sLoc.x + bSize.width / 2, sLoc.y + bSize.height * 2); > 140: if (!exitSema.await(1, TimeUnit.SECONDS)) { > 141: throw new RuntimeException("Mouse is not moved"); Suggestion: throw new RuntimeException("Mouse did not exit"); test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 148: > 146: r.mouseWheel(1); > 147: if (!wheelSema.await(1, TimeUnit.SECONDS)) { > 148: throw new RuntimeException("Mouse is not wheeled"); Suggestion: throw new RuntimeException("Mouse is not wheeled 1"); For consistency with the printed message. test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 174: > 172: } finally { > 173: if (test.f != null) > 174: SwingUtilities.invokeAndWait(test.f::dispose); This is not thread-safe. Suggestion: SwingUtilities.invokeAndWait(() -> { if (test.f != null) { test.f.dispose(); } }); Please always use braces even when there's only one statement in the body. ------------- PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1693154589 PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1369043388 PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1369043551 PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1369046750 From duke at openjdk.org Mon Oct 23 18:09:51 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 23 Oct 2023 18:09:51 GMT Subject: RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v39] In-Reply-To: References: Message-ID: On Fri, 13 Oct 2023 07:50:17 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: > > - Merge master > - CSS.java : > - Update source code declaration in documentation comments and specifications. > - Typo in an argument. > - MissingColorNames.java : > - Catches the Color Illegal Argument Exception and appends it to the result summary. > - Uncomments rgb tests. > - MissingColorNames.java : > - Rename the color which doesn't belong to CSS-COLOR-4 specification. > - Merge master > - MissingColorNames.java : > - Add a subset of RGB and RGBA tests. > - MissingColorNames.java : > - rename the list of string test. > > CSS.java : > - correct a wrong index. > - MissingColorNames.java : Adds a subset of hexadecimal tests. > - Merge scientificware-patch-003-CSS-add_4_8_digits_hex_coded_color > > # Conflicts: > # src/java.desktop/share/classes/javax/swing/text/html/CSS.java > - Merge master > - ... and 49 more: https://git.openjdk.org/jdk/compare/1082c0e7...9898fedf Actually, JDK-8294090 https://github.com/openjdk/jdk/pull/15262 successfully parses expressions like `rgba(12 24 200%)` but the CSS spec doesn't allow mixing numbers and percentages in R, G and B components. I am correcting this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/9825#issuecomment-1775738789 From prr at openjdk.org Mon Oct 23 18:52:36 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 23 Oct 2023 18:52:36 GMT Subject: RFR: 8318100: Remove redundant check for Metal support In-Reply-To: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> References: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> Message-ID: On Mon, 23 Oct 2023 16:46:24 GMT, Jayathirth D V wrote: > We have updated minimum macOS version on which JDK can be used to macOS 11 and we have check to enable metal pipeline only when macOS version is >=10.14. > > Since minimum macOS version is updated we don't need this check now. > Removed redundant check and ran all clientlibs tests on CI for verification. > Also ran a sample program with different combination of sun.java2d.metal and sun.java2d.opengl flags and i see that appropriate pipeline is getting selected. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16316#pullrequestreview-1693301138 From honkar at openjdk.org Mon Oct 23 19:25:12 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 23 Oct 2023 19:25:12 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 Message-ID: Harfbuzz upgraded from 7.2.0 to 8.2.2 - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff1.hh - 173 files modified. ------------- Commit messages: - .md file - modified files - deleted files Changes: https://git.openjdk.org/jdk/pull/16322/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8313643 Stats: 12796 lines in 178 files changed: 7112 ins; 1314 del; 4370 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From aivanov at openjdk.org Mon Oct 23 20:40:14 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 20:40:14 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v3] In-Reply-To: References: Message-ID: > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Add instructions on how to use PassFailJFrame ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15665/files - new: https://git.openjdk.org/jdk/pull/15665/files/62521e38..0be29d16 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=01-02 Stats: 73 lines in 1 file changed: 73 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15665/head:pull/15665 PR: https://git.openjdk.org/jdk/pull/15665 From duke at openjdk.org Mon Oct 23 20:51:36 2023 From: duke at openjdk.org (ScientificWare) Date: Mon, 23 Oct 2023 20:51:36 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Mon, 23 Oct 2023 12:04:10 GMT, Alexey Ivanov wrote: > What purpose does this distinction serve? Definitely an application developer and because it's the context of this HTML implementation, may I preserve this distinction ? > This actually raises another question: what if altAtt isn't provided? Should it fallback to srcURL? Yes, it's a logical error on my part. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1369249914 From aivanov at openjdk.org Mon Oct 23 21:02:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 21:02:40 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v3] In-Reply-To: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> References: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> Message-ID: On Wed, 20 Sep 2023 18:12:25 GMT, Phil Race wrote: >>> Shouldn't we mention here a window added by `testUI` via builder? >> >> I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. >> >> In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. >> >> I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. > >> > Shouldn't we mention here a window added by `testUI` via builder? >> >> I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. >> >> In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. >> >> I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. > > Just saw this, and it mirrors what I wrote in another PR that we need docs, but I believe they are best placed inside the source itself. Not everyone who can update this source can update the wiki. > That doesn't preclude you from putting more examples on the wiki and a reference to it from the source but I still think there should be docs in the source. > > Include how to use this feature and something like to the builder example you have here might be good too. @prrace I've just pushed documentation on how to use `PassFailJFrame`. It provided two samples: the new one with the builder pattern and the classic one. The samples can be copied and pasted into a file, they're ready to run, except for imports and jtreg tags. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1369259910 From aivanov at openjdk.org Mon Oct 23 21:13:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 21:13:40 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Wed, 20 Sep 2023 18:05:31 GMT, Phil Race wrote: >> I know HTML is *not case sensitive*. It's just HTML tags are always in lower case in recent years. >> >>> But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). >> >> Yep! In a way, this will enforce `` in lower case, and I hope all other tags in the instructions. >> >> >> >>> > Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? >>> >>> It is a matter of personal taste. >> >> Yes, it is? which could create inconsistencies. >> >>> Normally, I prefer to indent a content of such tags by extra spaces, and >>> This can create additional formatting difficulties under the 80(120) character limit per line. >>> In those cases, I would prefer to omit those tags. >> >> I don't expect too many nesting levels in instructions. However, I agree it could be problematic? >> >> In the sample in #15661, I keep `` and the content on the same level. >> >> Now that I looked at it again, I realised that I didn't follow the indentation consistently: first-level `

  • ` aren't indented but third-level `
  • ` are. I should correct this. >> >> Because `
    ` is used to format pieces of code, I decided not to indent the first-level `
  • ` elements to avoid indentation of the code inside. > > I don't have a problem with keeping it simple. If some one writing a test doesn't see the HTML interpreted, they'll quickly be able to figure out why. > One thing about these and the other enhancements I see is that there's an (increasing) need for a nice bit of documentation in PassFailJFrame itself about all its features. > Easiest to do this as you are adding them, so a doc comment block can be started with this one. > Probably as a class comment. > > Suggested text > /** > * PassFailJFrame documentation > * > * Instructions for the user can be either plain text or HTML as supported by Swing. > * Text beginning with is presumed to be HTML. > */ @prrace I've added description on how to use `PassFailJFrame` to #15665, it handles both HTML formatting for instructions (this PR) as well as creating test UI by passing a method reference, or rather an implementation of an interface. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1369268704 From aivanov at openjdk.org Mon Oct 23 21:22:36 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 23 Oct 2023 21:22:36 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v3] In-Reply-To: References: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> Message-ID: On Mon, 23 Oct 2023 20:59:49 GMT, Alexey Ivanov wrote: >>> > Shouldn't we mention here a window added by `testUI` via builder? >>> >>> I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. >>> >>> In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. >>> >>> I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. >> >> Just saw this, and it mirrors what I wrote in another PR that we need docs, but I believe they are best placed inside the source itself. Not everyone who can update this source can update the wiki. >> That doesn't preclude you from putting more examples on the wiki and a reference to it from the source but I still think there should be docs in the source. >> >> Include how to use this feature and something like to the builder example you have here might be good too. > > @prrace I've just pushed documentation on how to use `PassFailJFrame`. It provided two samples: the new one with the builder pattern and the classic one. The samples can be copied and pasted into a file, they're ready to run, except for imports and jtreg tags. I also submitted a bug to provide more comprehensive documentation: [JDK-8318688](https://bugs.openjdk.org/browse/JDK-8318688): _Write documentation for PassFailJFrame_ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1369276650 From lkorinth at openjdk.org Tue Oct 24 07:49:30 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 24 Oct 2023 07:49:30 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v6] In-Reply-To: References: Message-ID: > Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. > > I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` > > Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: > > /** > * Create ProcessBuilder using the java launcher from the jdk to > * be tested. > * > *

    Please observe that you likely should use > * createTestJvm() instead of this method because createTestJvm() > * will add JVM options from "test.vm.opts" and "test.java.opts" > * and this method will not do that. > * > * @param command Arguments to pass to the java command. > * @return The ProcessBuilder instance representing the java command. > */ > > > I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... > > I have run tier 1 testing, and I have started more exhaustive testing. Leo Korinth has updated the pull request incrementally with six additional commits since the last revision: - static import - copyright - whitespace - whitespace - sed - fix test/lib/jdk/test/lib/process/ProcessTools.java ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15452/files - new: https://git.openjdk.org/jdk/pull/15452/files/f80dda8d..2f57a32d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=04-05 Stats: 1580 lines in 560 files changed: 44 ins; 34 del; 1502 mod Patch: https://git.openjdk.org/jdk/pull/15452.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15452/head:pull/15452 PR: https://git.openjdk.org/jdk/pull/15452 From lkorinth at openjdk.org Tue Oct 24 09:10:43 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 24 Oct 2023 09:10:43 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v6] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 07:49:30 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

    Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with six additional commits since the last revision: > > - static import > - copyright > - whitespace > - whitespace > - sed > - fix test/lib/jdk/test/lib/process/ProcessTools.java Hi, if you want to see what I have modified manually, you can do my sed commands and compare to this pull request: git switch -c _reproduce 15acf4b8d7cffcd0d74bf1b9c43cde9acaf31ea9 find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createLimitedTestJavaProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/createTestJvm(/createTestJavaProcessBuilder(/g" find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createJavaProcessBuilder/import static jdk.test.lib.process.ProcessTools.createLimitedTestJavaProcessBuilder/g" find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createTestJvm/import static jdk.test.lib.process.ProcessTools.createTestJavaProcessBuilder/g" git add -u; git commit -m sed git diff-tree --no-commit-id --name-only -r 15acf4b8d7cffcd0d74bf1b9c43cde9acaf31ea9..HEAD | xargs sed -i -e "s%^( * Copyright (c) ....)[^[:alpha:]]*(Oracle.*)%\1, 2023, \2%" git ls-files -m | xargs sed -i -e "s%(Copyright (c) 2023), 2023, (Oracle.*)%\1, \2%" git add -u; git commit -m copyright git diff HEAD 2f57a32df8d17da51a04177563327ca2a75e8061 It will give you an easier way to review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1776817287 From stefank at openjdk.org Tue Oct 24 09:51:39 2023 From: stefank at openjdk.org (Stefan Karlsson) Date: Tue, 24 Oct 2023 09:51:39 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v6] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 07:49:30 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

    Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with six additional commits since the last revision: > > - static import > - copyright > - whitespace > - whitespace > - sed > - fix test/lib/jdk/test/lib/process/ProcessTools.java Marked as reviewed by stefank (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15452#pullrequestreview-1694437335 From aivanov at openjdk.org Tue Oct 24 11:04:52 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 11:04:52 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame [v2] In-Reply-To: References: Message-ID: <1ZPhiuQyo0KGDzWLP-TyRQvTPO9RQiNVe7u76iRC4Xs=.6dcab638-faae-42f4-be7b-27b095070d6a@github.com> > Refactored timeout handling in PassFailJFrame: > > 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. > 2. The class handles timer events and updates the label accordingly. > > This is implemented on top of #15665. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Refactor failure reason Ensure the failure reason doesn't change after it's set. Removed 'failed' and 'timeout' fields: if failureReason is set, the test fails. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15668/files - new: https://git.openjdk.org/jdk/pull/15668/files/27f39736..39ebc7c8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15668&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15668&range=00-01 Stats: 79 lines in 1 file changed: 47 ins; 15 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/15668.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15668/head:pull/15668 PR: https://git.openjdk.org/jdk/pull/15668 From aivanov at openjdk.org Tue Oct 24 11:22:36 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 11:22:36 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame [v2] In-Reply-To: References: Message-ID: <-4xuGFtlwOCJol4n15cIN8cXNPb2mrGdE0mkf-Af6rM=.70114749-aa9b-4beb-9dcb-d8bd7cacc34e@github.com> On Tue, 19 Sep 2023 18:35:12 GMT, Phil Race wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: >> >> Refactor failure reason >> >> Ensure the failure reason doesn't change after it's set. >> Removed 'failed' and 'timeout' fields: >> if failureReason is set, the test fails. > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 329: > >> 327: timer.stop(); >> 328: testFailedReason = FAILURE_REASON >> 329: + "Timeout User did not perform testing."; > > If the test was explicitly failed by the user (ie failed==true), why does the reason say that there was a time out ? @prrace Eventually, I refactored handling of `failureReason`. I removed `failed` and `timeout` fields; the `failureReason` is set via a synchronised method to ensure there cannot be data race. If `failureReason` is not `null`, the test fails. After `failureReason` is set to a non-`null` value, it cannot be changed. The timeout handler relies on this behaviour: it calls `setFailureReason` unconditionally; if `failureReason` is already set, the timeout reason is ignored. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15668#discussion_r1369999854 From lmesnik at openjdk.org Tue Oct 24 17:04:41 2023 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Tue, 24 Oct 2023 17:04:41 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v6] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 07:49:30 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with six additional commits since the last revision: > > - static import > - copyright > - whitespace > - whitespace > - sed > - fix test/lib/jdk/test/lib/process/ProcessTools.java Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15452#pullrequestreview-1695447658 From prr at openjdk.org Tue Oct 24 18:06:32 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 24 Oct 2023 18:06:32 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v3] In-Reply-To: References: Message-ID: On Mon, 23 Oct 2023 20:40:14 GMT, Alexey Ivanov wrote: >> This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. >> >> The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. >> >> Alternatively, you can pass an already created window. >> >> The `main` method of a manual test could look as simple as a sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .testUI(() -> createTestUI()) >> .build() >> .awaitAndCheck(); >> } >> >> where `createTestUI` returns a test UI window. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Add instructions on how to use PassFailJFrame Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15665#pullrequestreview-1695556451 From prr at openjdk.org Tue Oct 24 18:12:32 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 24 Oct 2023 18:12:32 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame [v2] In-Reply-To: <1ZPhiuQyo0KGDzWLP-TyRQvTPO9RQiNVe7u76iRC4Xs=.6dcab638-faae-42f4-be7b-27b095070d6a@github.com> References: <1ZPhiuQyo0KGDzWLP-TyRQvTPO9RQiNVe7u76iRC4Xs=.6dcab638-faae-42f4-be7b-27b095070d6a@github.com> Message-ID: On Tue, 24 Oct 2023 11:04:52 GMT, Alexey Ivanov wrote: >> Refactored timeout handling in PassFailJFrame: >> >> 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. >> 2. The class handles timer events and updates the label accordingly. >> >> This is implemented on top of #15665. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Refactor failure reason > > Ensure the failure reason doesn't change after it's set. > Removed 'failed' and 'timeout' fields: > if failureReason is set, the test fails. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15668#pullrequestreview-1695573011 From prr at openjdk.org Tue Oct 24 18:13:30 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 24 Oct 2023 18:13:30 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Mon, 11 Sep 2023 13:11:10 GMT, Alexey Ivanov wrote: > This enhancement provides HTML formatting for instructions in the manual test framework, `PassFailJFrame`. > > Some tests could benefit from rich-formatted instructions, especially when the instructions are long. > > See a sample usage in #15661. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15660#pullrequestreview-1695578095 From aivanov at openjdk.org Tue Oct 24 18:14:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 18:14:38 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Mon, 23 Oct 2023 20:48:31 GMT, ScientificWare wrote: > > What purpose does this distinction serve? > > Definitely an application developer and because it's the context of this HTML implementation, may I preserve this distinction ? Okay, let it be. However, I still think it's not the right thing. There was nothing else but the `src` attribute, now there is. > > This actually raises another question: what if altAtt isn't provided? Should it fallback to srcURL? > > Yes, it's a logical error on my part. Are you going to address it? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370634475 From honkar at openjdk.org Tue Oct 24 18:35:31 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 24 Oct 2023 18:35:31 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: removed not needed DISABLED_WARNINGS flag for clang ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16322/files - new: https://git.openjdk.org/jdk/pull/16322/files/bcba463a..b6c6470b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From honkar at openjdk.org Tue Oct 24 18:42:35 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 24 Oct 2023 18:42:35 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 18:35:31 GMT, Harshitha Onkar wrote: >> Harfbuzz upgraded from 7.2.0 to 8.2.2 >> >> - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh >> - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh >> - 173 files modified. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > removed not needed DISABLED_WARNINGS flag for clang make/modules/java.desktop/lib/Awt2dLibraries.gmk line 503: > 501: # expansion-to-defined required for GCC 9 builds. Not required for GCC 10+. > 502: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference > 503: HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers Removed `range-loop-analysis` disabled warning flag for clang. macOS build works with this change. CI build works without array-bounds, parentheses for HARFBUZZ_DISABLED_WARNINGS_gcc but since these flags were added recently to make build work on specific gcc versions [ [PR#14996](https://github.com/openjdk/jdk/pull/14996/files) and [PR#13859](https://github.com/openjdk/jdk/pull/13859/files) ], retaining it as-is. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1370667019 From aivanov at openjdk.org Tue Oct 24 18:57:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 18:57:39 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v2] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Mon, 23 Oct 2023 17:45:38 GMT, Alexey Ivanov wrote: > The updated test failed once on Linux when I ran the test on Friday? I've run this test on all the platforms a few times more, no failures detected. So I consider that failure a one-off glitch. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16281#issuecomment-1777839177 From duke at openjdk.org Tue Oct 24 18:57:40 2023 From: duke at openjdk.org (ScientificWare) Date: Tue, 24 Oct 2023 18:57:40 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: <__Q80iQTMdCxiJn8j77l5LGv86zuOv8AUFe28ha0tkI=.54fb2c65-499f-4364-9513-555520cb819b@github.com> On Mon, 23 Oct 2023 12:09:35 GMT, Alexey Ivanov wrote: >> src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 282: >> >>> 280: @SuppressWarnings("deprecation") >>> 281: URL srcURL = new URL(base, srcAtt); >>> 282: ImageIcon icon = new ImageIcon(srcURL); >> >> You should probably pass `altAtt` as the `description` parameter, yet I'm unsure if it's ever used in this context. > >> You should probably pass `altAtt` as the `description` parameter, yet I'm unsure if it's ever used in this context. > > As I say, I'm unsure if it's used? The description could be exposed to Accessibility API. By default, `ImageIcon` uses the URL as the description if it isn't provided: > > https://github.com/openjdk/jdk/blob/99de9bb83ff70fe81c89751516a86a94c8f552be/src/java.desktop/share/classes/javax/swing/ImageIcon.java#L231-L233 > > Now that you handle the `alt` attribute, you can pass the description if it's provided. ![image](https://github.com/openjdk/jdk/assets/19194678/a98c058e-323f-49c5-af63-2f5b837b9b99) Did you have this in mind ?

    String srcAtt = (String) attr.getAttribute(HTML.Attribute.SRC); String altAtt = (String) attr.getAttribute(HTML.Attribute.ALT); if (altAtt == null) { altAtt = srcAtt; } JButton button; try { URL base = ((HTMLDocument)getElement().getDocument()).getBase(); @SuppressWarnings("deprecation") URL srcURL = new URL(base, srcAtt); ImageIcon icon = new ImageIcon(srcURL, altAtt); button = new JButton(icon); } catch (MalformedURLException e) { button = new JButton(altAtt == null ? srcAtt : altAtt); } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370684162 From duke at openjdk.org Tue Oct 24 19:06:37 2023 From: duke at openjdk.org (ScientificWare) Date: Tue, 24 Oct 2023 19:06:37 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 18:12:14 GMT, Alexey Ivanov wrote: >>> What purpose does this distinction serve? >> >> Definitely an application developer and because it's the context of this HTML implementation, may I preserve this distinction ? >> >>> This actually raises another question: what if altAtt isn't provided? Should it fallback to srcURL? >> >> Yes, it's a logical error on my part. > >> > What purpose does this distinction serve? >> >> Definitely an application developer and because it's the context of this HTML implementation, may I preserve this distinction ? > > Okay, let it be. However, I still think it's not the right thing. > > There was nothing else but the `src` attribute, now there is. > >> > This actually raises another question: what if altAtt isn't provided? Should it fallback to srcURL? >> >> Yes, it's a logical error on my part. > > Are you going to address it? ![image](https://github.com/openjdk/jdk/assets/19194678/0c4ba14d-84df-4c45-abb2-f3f9dca01bd2)

    - Left before the Patch - Right with your suggestion and if the distinction is preserved. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370696319 From dnguyen at openjdk.org Tue Oct 24 19:16:27 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 24 Oct 2023 19:16:27 GMT Subject: RFR: 8318100: Remove redundant check for Metal support In-Reply-To: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> References: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> Message-ID: On Mon, 23 Oct 2023 16:46:24 GMT, Jayathirth D V wrote: > We have updated minimum macOS version on which JDK can be used to macOS 11 and we have check to enable metal pipeline only when macOS version is >=10.14. > > Since minimum macOS version is updated we don't need this check now. > Removed redundant check and ran all clientlibs tests on CI for verification. > Also ran a sample program with different combination of sun.java2d.metal and sun.java2d.opengl flags and i see that appropriate pipeline is getting selected. Changes look reasonable to me. Test results look good too ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/16316#pullrequestreview-1695706623 From aivanov at openjdk.org Tue Oct 24 19:21:30 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 19:21:30 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: <7wuE9aFqxLJBW8h_yr2BJm51j3tnQWNtbdGp2q4PH14=.f0eaa11c-8dd4-49d3-93d3-974426298528@github.com> On Tue, 24 Oct 2023 19:04:05 GMT, ScientificWare wrote: >>> > What purpose does this distinction serve? >>> >>> Definitely an application developer and because it's the context of this HTML implementation, may I preserve this distinction ? >> >> Okay, let it be. However, I still think it's not the right thing. >> >> There was nothing else but the `src` attribute, now there is. >> >>> > This actually raises another question: what if altAtt isn't provided? Should it fallback to srcURL? >>> >>> Yes, it's a logical error on my part. >> >> Are you going to address it? > > ![image](https://github.com/openjdk/jdk/assets/19194678/0c4ba14d-84df-4c45-abb2-f3f9dca01bd2) > > > > > > >

    > >

    > >

    > >

    > >

    > >

    > > > > > - Left before the Patch > - Right with your suggestion and if the distinction is preserved. Yes, that's what I meant. A button with the plain source is better than a button without a title at all. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370710100 From aivanov at openjdk.org Tue Oct 24 19:30:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 24 Oct 2023 19:30:38 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: <__Q80iQTMdCxiJn8j77l5LGv86zuOv8AUFe28ha0tkI=.54fb2c65-499f-4364-9513-555520cb819b@github.com> References: <__Q80iQTMdCxiJn8j77l5LGv86zuOv8AUFe28ha0tkI=.54fb2c65-499f-4364-9513-555520cb819b@github.com> Message-ID: <0MGaVlAv8Javf1QqspsC-hE4l1Huy9QMoqTdCxZ5AJ8=.1b91e01e-b44a-4db1-a7a5-67f36e609d01@github.com> On Tue, 24 Oct 2023 18:54:17 GMT, ScientificWare wrote: >>> You should probably pass `altAtt` as the `description` parameter, yet I'm unsure if it's ever used in this context. >> >> As I say, I'm unsure if it's used? The description could be exposed to Accessibility API. By default, `ImageIcon` uses the URL as the description if it isn't provided: >> >> https://github.com/openjdk/jdk/blob/99de9bb83ff70fe81c89751516a86a94c8f552be/src/java.desktop/share/classes/javax/swing/ImageIcon.java#L231-L233 >> >> Now that you handle the `alt` attribute, you can pass the description if it's provided. > > ![image](https://github.com/openjdk/jdk/assets/19194678/a98c058e-323f-49c5-af63-2f5b837b9b99) > > Did you have this in mind ? > > > > >

    > >

    > >

    > >

    > >

    > >

    > > > > > > > String srcAtt = (String) attr.getAttribute(HTML.Attribute.SRC); > String altAtt = (String) attr.getAttribute(HTML.Attribute.ALT); > if (altAtt == null) { > altAtt = srcAtt; > } > JButton button; > try { > URL base = ((HTMLDocument)getElement().getDocument()).getBase(); > @SuppressWarnings("deprecation") > URL srcURL = new URL(base, srcAtt); > ImageIcon icon = new ImageIcon(srcURL, altAtt); > button = new JButton(icon); > } catch (MalformedURLException e) { > button = new JButton(altAtt == null ? srcAtt : altAtt); > } Yes, something similar: String srcAtt = (String) attr.getAttribute(HTML.Attribute.SRC); String altAtt = (String) attr.getAttribute(HTML.Attribute.ALT); JButton button; try { URL base = ((HTMLDocument)getElement().getDocument()).getBase(); @SuppressWarnings("deprecation") URL srcURL = new URL(base, srcAtt); ImageIcon icon = altAtt != null ? new ImageIcon(srcURL, altAtt) : new ImageIcon(srcURL); button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt != null ? altAtt : srcAtt); } catch (MalformedURLException e) { button = new JButton(altAtt != null ? altAtt : srcAtt); } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370719498 From duke at openjdk.org Tue Oct 24 19:35:36 2023 From: duke at openjdk.org (ScientificWare) Date: Tue, 24 Oct 2023 19:35:36 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: <7wuE9aFqxLJBW8h_yr2BJm51j3tnQWNtbdGp2q4PH14=.f0eaa11c-8dd4-49d3-93d3-974426298528@github.com> References: <7wuE9aFqxLJBW8h_yr2BJm51j3tnQWNtbdGp2q4PH14=.f0eaa11c-8dd4-49d3-93d3-974426298528@github.com> Message-ID: <0jhnoG73CtNim4AP-kiwmBMtAS_LmNTXCDp4Ld28WD8=.61b828ac-f0ee-4640-806f-de869cb7746f@github.com> On Tue, 24 Oct 2023 19:18:20 GMT, Alexey Ivanov wrote: >> ![image](https://github.com/openjdk/jdk/assets/19194678/0c4ba14d-84df-4c45-abb2-f3f9dca01bd2) >> >> >> >> >> >> >>

    >> >>

    >> >>

    >> >>

    >> >>

    >> >>

    >> >> >> >> >> - Left before the Patch >> - Right with your suggestion and if the distinction is preserved. > > Yes, that's what I meant. > > A button with the plain source is better than a button without a title at all. > Are you going to address it? Yes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1370724775 From rriggs at openjdk.org Tue Oct 24 19:42:43 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 24 Oct 2023 19:42:43 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v6] In-Reply-To: References: Message-ID: <6qyfRp98A2DA7Q7YhscmdmokkIvVVn9HxB_XjRdM47g=.615d7a65-e109-41db-b955-31c0a934debd@github.com> On Tue, 24 Oct 2023 07:49:30 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with six additional commits since the last revision: > > - static import > - copyright > - whitespace > - whitespace > - sed > - fix test/lib/jdk/test/lib/process/ProcessTools.java test/lib/jdk/test/lib/process/ProcessTools.java line 506: > 504: */ > 505: public static ProcessBuilder createTestJavaProcessBuilder(List command) { > 506: return createTestJavaProcessBuilder(command.toArray(String[]::new)); The javadoc shoul d describe all of the options being added to the ProcessBuilder. They were inadequated described previously and still are. The other options (seem to be from the code), test.noclasspath, java.class.path, and test.thread.factory. The description of test.thread.factory and addTestThreadFactoryArgs method seems inadequately described. test/lib/jdk/test/lib/process/ProcessTools.java line 527: > 525: * Create ProcessBuilder using the java launcher from the jdk to > 526: * be tested. > 527: * As above, should described the limited options that are added to the ProcessBuilder, the same as for `reateTestJavaProcessBuilder(...)` test/lib/jdk/test/lib/process/ProcessTools.java line 549: > 547: * Create ProcessBuilder using the java launcher from the jdk to > 548: * be tested. > 549: * As above, should described the limited options that are added to the ProcessBuilder, the same as for reateTestJavaProcessBuilder(...) test/lib/jdk/test/lib/process/ProcessTools.java line 599: > 597: */ > 598: public static OutputAnalyzer executeTestJvm(String... cmds) throws Exception { > 599: ProcessBuilder pb = createTestJavaProcessBuilder(cmds); This should also describe *all* of the options being set in the ProcessBuilder before executing the process. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1370728371 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1370729609 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1370729925 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1370730637 From duke at openjdk.org Wed Oct 25 03:23:01 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 25 Oct 2023 03:23:01 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v3] In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Suggestions integrated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16281/files - new: https://git.openjdk.org/jdk/pull/16281/files/2ef843df..56a06f12 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=01-02 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16281.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16281/head:pull/16281 PR: https://git.openjdk.org/jdk/pull/16281 From jdv at openjdk.org Wed Oct 25 04:01:27 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 25 Oct 2023 04:01:27 GMT Subject: RFR: 8318100: Remove redundant check for Metal support In-Reply-To: <5bTDtWyT7qZIa3eD9aEF-tVFa5lepXdNcLSpMyUI7zk=.26dd8fee-51c4-4705-8ad4-7bea599cc054@github.com> References: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> <5bTDtWyT7qZIa3eD9aEF-tVFa5lepXdNcLSpMyUI7zk=.26dd8fee-51c4-4705-8ad4-7bea599cc054@github.com> Message-ID: On Mon, 23 Oct 2023 17:26:16 GMT, Sergey Bylokhov wrote: > Just wonder how the the java will work on 10.xx after JDK-8317970 integration, it will fail to start? Yes. Last update to macOS Catalina was in Mid 2022 as mentioned at https://bugs.openjdk.org/browse/JDK-8317970. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16316#issuecomment-1778467635 From jdv at openjdk.org Wed Oct 25 04:04:41 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 25 Oct 2023 04:04:41 GMT Subject: Integrated: 8318100: Remove redundant check for Metal support In-Reply-To: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> References: <5o31QXbBtHwEsAAdoj8Zw5m-OVneowbTaWhUx4p_mms=.0b329fa4-f3e9-43f1-b7df-216b6d22a86f@github.com> Message-ID: On Mon, 23 Oct 2023 16:46:24 GMT, Jayathirth D V wrote: > We have updated minimum macOS version on which JDK can be used to macOS 11 and we have check to enable metal pipeline only when macOS version is >=10.14. > > Since minimum macOS version is updated we don't need this check now. > Removed redundant check and ran all clientlibs tests on CI for verification. > Also ran a sample program with different combination of sun.java2d.metal and sun.java2d.opengl flags and i see that appropriate pipeline is getting selected. This pull request has now been integrated. Changeset: 5ce718eb Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/5ce718eb175dd0855983577d41b0af57422f4a0e Stats: 40 lines in 3 files changed: 0 ins; 39 del; 1 mod 8318100: Remove redundant check for Metal support Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/16316 From jdv at openjdk.org Wed Oct 25 04:33:35 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 25 Oct 2023 04:33:35 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Tue, 24 Oct 2023 18:38:27 GMT, Harshitha Onkar wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> removed not needed DISABLED_WARNINGS flag for clang > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 503: > >> 501: # expansion-to-defined required for GCC 9 builds. Not required for GCC 10+. >> 502: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference >> 503: HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers > > Removed `range-loop-analysis` disabled warning flag for clang. macOS build works with this change. > > CI build works without array-bounds, parentheses for HARFBUZZ_DISABLED_WARNINGS_gcc but since these flags were added recently to make build work on specific gcc versions [ [PR#14996](https://github.com/openjdk/jdk/pull/14996/files) and [PR#13859](https://github.com/openjdk/jdk/pull/13859/files) ], retaining it as-is. Any specific reason why we need to remove `range-loop-analysis` flag as part of this update? Were there any build issues? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1371138825 From psadhukhan at openjdk.org Wed Oct 25 07:26:42 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 25 Oct 2023 07:26:42 GMT Subject: Integrated: 8318102: macos10.14 check in CSystemColors can be removed. In-Reply-To: References: Message-ID: On Mon, 16 Oct 2023 07:43:06 GMT, Prasanta Sadhukhan wrote: > Since [ JDK-8317970](https://bugs.openjdk.org/browse/JDK-8317970) in integrated to make macOS 11 the minimum version to build jdk, the 10.14 check added in [JDK-8284166](https://bugs.openjdk.org/browse/JDK-8284166) is not needed and can be removed.. This pull request has now been integrated. Changeset: d7205e69 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/d7205e690fe92464caee9122e11a88b4cc5c2c2d Stats: 10 lines in 1 file changed: 0 ins; 8 del; 2 mod 8318102: macos10.14 check in CSystemColors can be removed. Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16198 From stefank at openjdk.org Wed Oct 25 07:27:32 2023 From: stefank at openjdk.org (Stefan Karlsson) Date: Wed, 25 Oct 2023 07:27:32 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v3] In-Reply-To: References: <5o5B7LbCQN_C9xzd1EvrvTp04-6Atr0gih5WH69LeK4=.3a977034-8fe9-4da8-a167-f5dad3a97d75@github.com> Message-ID: On Tue, 5 Sep 2023 18:05:34 GMT, Roger Riggs wrote: >> I have created an alternative that uses enums to force the user to make a decision: https://github.com/openjdk/jdk/compare/master...lkorinth:jdk:+process_tools . Another alternative is to do the same but instead using an enum (I think it is not as good). A third alternative is to use the current pull request with a better name. >> >> What do you prefer? Do you have a better alternative? Do someone still think the current code is good? I think what we have today is inferior to all these improvements, and I would like to make it harder to develop bad test cases. > >> What do you prefer? Do you have a better alternative? Do someone still think the current code is good? I think what we have today is inferior to all these improvements, and I would like to make it harder to develop bad test ca > > The current API (name) is fine and fit for purpose; it does not promise or hide extra functionality under a simple name. > > There needs to be an explicit intention in the test(s) to support after the fact that arbitrary flags can be added. > @AlanBateman's proposal for naming [above](https://github.com/openjdk/jdk/pull/15452#issuecomment-1700459277) (or similar) would capture more clearly that test options are propagated to the child process. > Every test writer should be aware that additional command line options may be mixed in. > > There are many cases in which the ProcessTools APIs are not used to create child processes and do not need to be used in writing tests. They provide some convenience but also add a dependency and another API layer to work through in the case of failures. > > As far as I'm aware, there is no general guidance or design pattern outside of hotspot tests to propagate flags or use ProcessTools. Adding that as a requirement will need a different level of communication and change. @RogerRiggs You seem to know what you want w.r.t. the extra java doc comments. Could you help write those? Could we also do that as a separate RFE? I think that would make it easier to get this PR and the javadoc update through the door. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1778669353 From psadhukhan at openjdk.org Wed Oct 25 08:20:44 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 25 Oct 2023 08:20:44 GMT Subject: Withdrawn: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI In-Reply-To: References: Message-ID: On Thu, 5 Oct 2023 16:43:17 GMT, Prasanta Sadhukhan wrote: > A JOptionPane message dialog owned by a JFrame which is not always on top can be obscured behind an `"always on top" JFrame`. Since the option pane is modal, one can't move the "always on top frame" to reveal it, so the application effectively hangs as we cannot dismiss the option pane dialog > Fix is to make sure the option pane dialog is always on top.... This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/16060 From lkorinth at openjdk.org Wed Oct 25 08:44:29 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 25 Oct 2023 08:44:29 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v7] In-Reply-To: References: Message-ID: > This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. > > This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: fix copyright year and indentation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15452/files - new: https://git.openjdk.org/jdk/pull/15452/files/2f57a32d..4cc3865a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15452&range=05-06 Stats: 23 lines in 1 file changed: 0 ins; 0 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/15452.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15452/head:pull/15452 PR: https://git.openjdk.org/jdk/pull/15452 From aivanov at openjdk.org Wed Oct 25 11:19:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 11:19:45 GMT Subject: Integrated: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Mon, 11 Sep 2023 13:11:10 GMT, Alexey Ivanov wrote: > This enhancement provides HTML formatting for instructions in the manual test framework, `PassFailJFrame`. > > Some tests could benefit from rich-formatted instructions, especially when the instructions are long. > > See a sample usage in #15661. This pull request has now been integrated. Changeset: 14090ef6 Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/14090ef6039ff2f3064f397a75219b2bc715cc27 Stats: 40 lines in 1 file changed: 35 ins; 0 del; 5 mod 8294158: HTML formatting for PassFailJFrame instructions Reviewed-by: azvegint, prr ------------- PR: https://git.openjdk.org/jdk/pull/15660 From aivanov at openjdk.org Wed Oct 25 11:29:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 11:29:49 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v4] In-Reply-To: References: Message-ID: > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. Alexey Ivanov 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 master - Add instructions on how to use PassFailJFrame - 8294156: Allow creating several test windows The windows can be positioned in advance, or a call back PositionWindows interface can be used to define their positions after the instruction UI frame is positioned on the screen. - Remove trailing whitespace - Mark the Builder class final It's not supposed to be extended. - Amend message in window closing handler The WindowClosingHandler is used both for the instruction frame and for test UI windows. Also add blank lines to separate different parts of the class. - Use invokeOnEDT in getInstructionFrameBounds - Use functional style for disposing of windows Also clean up the doc for disposeWindows(). - Use statically imported invokeAndWait and isEDT - Build functional test UI The Builder now provides a method to create test UI, PassFailJFrame automatically invokes the method reference on the EDT and then shows both the instruction frame and the test window. - ... and 6 more: https://git.openjdk.org/jdk/compare/14090ef6...eff09d0d ------------- Changes: https://git.openjdk.org/jdk/pull/15665/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=03 Stats: 442 lines in 1 file changed: 365 ins; 38 del; 39 mod Patch: https://git.openjdk.org/jdk/pull/15665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15665/head:pull/15665 PR: https://git.openjdk.org/jdk/pull/15665 From aivanov at openjdk.org Wed Oct 25 11:30:55 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 11:30:55 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions [v4] In-Reply-To: References: Message-ID: > To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. > > This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits: - Merge master - Amend indentation of nested

  • elements - Revert "Revert changes to FileChooserSymLinkTest.java" This reverts commit 7753b3f3e2d3a0df5fde672ad41833b6a9c6e247. - Wrap createUI call It reverts the accidental change where I unwrapped call to createUI - Revert changes to FileChooserSymLinkTest.java - Refactor configuration of a text component for instructions Each text component (JTextArea or JEditorPane) are configured in its own dedicated method. This avoids unnecessary type casts. - Improve instruction formatting - Enable HTML display if instructions start with Instructions for FileChooserSymLinkTest are rendered in HTML. ------------- Changes: https://git.openjdk.org/jdk/pull/15661/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=03 Stats: 43 lines in 1 file changed: 13 ins; 0 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/15661.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15661/head:pull/15661 PR: https://git.openjdk.org/jdk/pull/15661 From aivanov at openjdk.org Wed Oct 25 11:34:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 11:34:44 GMT Subject: Integrated: 8294156: Allow PassFailJFrame.Builder to create test UI In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 15:36:56 GMT, Alexey Ivanov wrote: > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. This pull request has now been integrated. Changeset: 42b9ac8a Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/42b9ac8a07b540f4d7955a778923d24a876451cc Stats: 442 lines in 1 file changed: 365 ins; 38 del; 39 mod 8294156: Allow PassFailJFrame.Builder to create test UI Reviewed-by: azvegint, prr ------------- PR: https://git.openjdk.org/jdk/pull/15665 From aivanov at openjdk.org Wed Oct 25 11:36:35 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 11:36:35 GMT Subject: Integrated: 8316003: Update FileChooserSymLinkTest.java to HTML instructions In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 13:28:40 GMT, Alexey Ivanov wrote: > To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. > > This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). This pull request has now been integrated. Changeset: c587211b Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/c587211bf8c60a7a1f6cc63770c38ede6cb4e173 Stats: 43 lines in 1 file changed: 13 ins; 0 del; 30 mod 8316003: Update FileChooserSymLinkTest.java to HTML instructions Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15661 From ihse at openjdk.org Wed Oct 25 12:29:32 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 25 Oct 2023 12:29:32 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v3] In-Reply-To: References: Message-ID: On Fri, 20 Oct 2023 23:03:50 GMT, Phil Race wrote: >> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > Use new arrayElementVarHandle method src/java.base/share/classes/module-info.java line 151: > 149: exports jdk.internal.javac to > 150: java.compiler, > 151: java.desktop, // for ScopedValue The indentation looks odd..? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15476#discussion_r1371674366 From aivanov at openjdk.org Wed Oct 25 12:42:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 12:42:45 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame [v3] In-Reply-To: References: Message-ID: > Refactored timeout handling in PassFailJFrame: > > 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. > 2. The class handles timer events and updates the label accordingly. > > This is implemented on top of #15665. Alexey Ivanov 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 master - Refactor failure reason Ensure the failure reason doesn't change after it's set. Removed 'failed' and 'timeout' fields: if failureReason is set, the test fails. - 8316017: Refactor timeout handler in PassFailJFrame - Remove trailing whitespace - Mark the Builder class final It's not supposed to be extended. - Amend message in window closing handler The WindowClosingHandler is used both for the instruction frame and for test UI windows. Also add blank lines to separate different parts of the class. - Use invokeOnEDT in getInstructionFrameBounds - Use functional style for disposing of windows Also clean up the doc for disposeWindows(). - Use statically imported invokeAndWait and isEDT - Build functional test UI The Builder now provides a method to create test UI, PassFailJFrame automatically invokes the method reference on the EDT and then shows both the instruction frame and the test window. - ... and 6 more: https://git.openjdk.org/jdk/compare/c587211b...f590891b ------------- Changes: https://git.openjdk.org/jdk/pull/15668/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15668&range=02 Stats: 149 lines in 1 file changed: 92 ins; 33 del; 24 mod Patch: https://git.openjdk.org/jdk/pull/15668.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15668/head:pull/15668 PR: https://git.openjdk.org/jdk/pull/15668 From aivanov at openjdk.org Wed Oct 25 13:29:01 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 13:29:01 GMT Subject: RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v3] In-Reply-To: References: Message-ID: <3cGupG6NYaG7snJMpE0TjngOy0Fv1Xw9Q9NiFnqdVwg=.9810c0ea-10f9-470c-9532-fadddc96a45a@github.com> > This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests. > > The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .rows(35) > .columns(50) > .testUI(FileChooserSymLinkTest::createTestUI) > .build() > .awaitAndCheck(); > } > > > It's the most streamlined way of creating a manual test. > > This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660. Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - Amend indentation of nested
  • elements - Merge master - 8316025: Update the return type of createTestUI PassFailJFrame now supports creating a list of test windows - Merge branch '8294156-func-manual-TestUI' into 8316025-testUI-SymLinkTest - 8294156: Allow creating several test windows The windows can be positioned in advance, or a call back PositionWindows interface can be used to define their positions after the instruction UI frame is positioned on the screen. - Use testUI() and builder pattern to create test UI - Remove trailing whitespace - Mark the Builder class final It's not supposed to be extended. - Amend message in window closing handler The WindowClosingHandler is used both for the instruction frame and for test UI windows. Also add blank lines to separate different parts of the class. - Use invokeOnEDT in getInstructionFrameBounds - ... and 9 more: https://git.openjdk.org/jdk/compare/c587211b...0f4f67b3 ------------- Changes: https://git.openjdk.org/jdk/pull/15666/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15666&range=02 Stats: 123 lines in 1 file changed: 53 ins; 60 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/15666.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15666/head:pull/15666 PR: https://git.openjdk.org/jdk/pull/15666 From aivanov at openjdk.org Wed Oct 25 13:30:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 13:30:45 GMT Subject: Integrated: 8316017: Refactor timeout handler in PassFailJFrame In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 18:18:28 GMT, Alexey Ivanov wrote: > Refactored timeout handling in PassFailJFrame: > > 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. > 2. The class handles timer events and updates the label accordingly. > > This is implemented on top of #15665. This pull request has now been integrated. Changeset: 3abd7726 Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/3abd772672a4dfd984459283235f3b1d8fb28a49 Stats: 149 lines in 1 file changed: 92 ins; 33 del; 24 mod 8316017: Refactor timeout handler in PassFailJFrame Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15668 From aivanov at openjdk.org Wed Oct 25 14:22:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 14:22:41 GMT Subject: RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v3] In-Reply-To: <3cGupG6NYaG7snJMpE0TjngOy0Fv1Xw9Q9NiFnqdVwg=.9810c0ea-10f9-470c-9532-fadddc96a45a@github.com> References: <3cGupG6NYaG7snJMpE0TjngOy0Fv1Xw9Q9NiFnqdVwg=.9810c0ea-10f9-470c-9532-fadddc96a45a@github.com> Message-ID: On Wed, 25 Oct 2023 13:29:01 GMT, Alexey Ivanov wrote: >> This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests. >> >> The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .rows(35) >> .columns(50) >> .testUI(FileChooserSymLinkTest::createTestUI) >> .build() >> .awaitAndCheck(); >> } >> >> >> It's the most streamlined way of creating a manual test. >> >> This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660. > > Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: > > - Amend indentation of nested
  • elements > - Merge master > - 8316025: Update the return type of createTestUI > > PassFailJFrame now supports creating a list of test windows > - Merge branch '8294156-func-manual-TestUI' into 8316025-testUI-SymLinkTest > - 8294156: Allow creating several test windows > > The windows can be positioned in advance, or > a call back PositionWindows interface can be used > to define their positions after the instruction UI > frame is positioned on the screen. > - Use testUI() and builder pattern to create test UI > - Remove trailing whitespace > - Mark the Builder class final > > It's not supposed to be extended. > - Amend message in window closing handler > > The WindowClosingHandler is used both for the instruction > frame and for test UI windows. > Also add blank lines to separate different parts of the class. > - Use invokeOnEDT in getInstructionFrameBounds > - ... and 9 more: https://git.openjdk.org/jdk/compare/c587211b...0f4f67b3 @prrace, @azvegint Could you take a look? The PR on which this one depends have been integrated now. The PR #15661 updated the instructions to HTML, this PR uses the functional style of creating test UI introduced in #15665. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15666#issuecomment-1779391142 From aivanov at openjdk.org Wed Oct 25 15:20:34 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 25 Oct 2023 15:20:34 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v3] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Wed, 25 Oct 2023 03:23:01 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. >> Please review and let me know your suggestions, if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Suggestions integrated Changes requested by aivanov (Reviewer). test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 175: > 173: if (test.f != null) { > 174: SwingUtilities.invokeAndWait(test.f::dispose); > 175: } This is still not *thread-safe*, you've missed the suggested changes: the `null`-check must also be inside `invokeAndWait`: Suggestion: SwingUtilities.invokeAndWait(() -> { if (test.f != null) { test.f.dispose(); } }); ------------- PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1697655892 PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1371943516 From honkar at openjdk.org Wed Oct 25 17:18:36 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 25 Oct 2023 17:18:36 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 04:29:28 GMT, Jayathirth D V wrote: >> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 503: >> >>> 501: # expansion-to-defined required for GCC 9 builds. Not required for GCC 10+. >>> 502: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference >>> 503: HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers >> >> Removed `range-loop-analysis` disabled warning flag for clang. macOS build works with this change. >> >> CI build works without array-bounds, parentheses for HARFBUZZ_DISABLED_WARNINGS_gcc but since these flags were added recently to make build work on specific gcc versions [ [PR#14996](https://github.com/openjdk/jdk/pull/14996/files) and [PR#13859](https://github.com/openjdk/jdk/pull/13859/files) ], retaining it as-is. > > Any specific reason why we need to remove `range-loop-analysis` flag as part of this update? Were there any build issues? @jayathirthrao I removed `range-loop-analysis` as part of cleaning up the disabled warning section. I see that the following flag was added as part of https://github.com/openjdk/jdk/pull/993 to disable warnings for clang on Xcode 12. Details here: https://github.com/openjdk/jdk/pull/993#issuecomment-722382063. I suppose we need to add it back then? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1372084539 From prr at openjdk.org Wed Oct 25 17:52:35 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 25 Oct 2023 17:52:35 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 17:14:27 GMT, Harshitha Onkar wrote: >> Any specific reason why we need to remove `range-loop-analysis` flag as part of this update? Were there any build issues? > > @jayathirthrao > > Removed `range-loop-analysis` as part of cleaning up the disabled warning section. I see that the following flag was added as part of https://github.com/openjdk/jdk/pull/993 to disable warnings for clang on Xcode 12. > Details here: https://github.com/openjdk/jdk/pull/993#issuecomment-722382063. > > I suppose we need to add it back then? It depends. Perhaps the code that triggered the warning is no longer the same ? And we just moved to xcode 14 didn't we ? So xcode 12 is now 2 versions back. What you could try is to take a repo WITHOUT the new version of harfbuzz (ie one without your PR), remove the disabling of this warning and see if xcode 14 build it - if it does, then the issue is resolved by the new xcode and we may still need it for the new change. If the problem is still there with xcode 14 and the old (ie current existing) code, then its resolved by the hb update and we definitely don't need it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1372120649 From honkar at openjdk.org Wed Oct 25 18:03:34 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 25 Oct 2023 18:03:34 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 17:49:43 GMT, Phil Race wrote: >> @jayathirthrao >> >> Removed `range-loop-analysis` as part of cleaning up the disabled warning section. I see that the following flag was added as part of https://github.com/openjdk/jdk/pull/993 to disable warnings for clang on Xcode 12. >> Details here: https://github.com/openjdk/jdk/pull/993#issuecomment-722382063. >> >> I suppose we need to add it back then? > > It depends. Perhaps the code that triggered the warning is no longer the same ? > And we just moved to xcode 14 didn't we ? So xcode 12 is now 2 versions back. > What you could try is to take a repo WITHOUT the new version of harfbuzz (ie one without your PR), > remove the disabling of this warning and see if xcode 14 build it - if it does, then the issue is resolved by > the new xcode and we may still need it for the new change. If the problem is still there with xcode 14 and the old (ie current existing) code, then its resolved by the hb update and we definitely don't need it. @prrace Makes sense! Thank you for the info about how this can be double-checked. I'll check and update the disabled section accordingly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1372132481 From honkar at openjdk.org Wed Oct 25 19:43:15 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 25 Oct 2023 19:43:15 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v3] In-Reply-To: References: Message-ID: <9o46xmDiwhg8jYNfuaHQRL__JfiqdBglMze1F3rWz5c=.e9def672-db3e-481b-8023-0a01aeab8233@github.com> > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: reverted disabled warning: range-loop-analysis ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16322/files - new: https://git.openjdk.org/jdk/pull/16322/files/b6c6470b..4befbca0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From honkar at openjdk.org Wed Oct 25 19:43:18 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 25 Oct 2023 19:43:18 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 18:00:58 GMT, Harshitha Onkar wrote: >> It depends. Perhaps the code that triggered the warning is no longer the same ? >> And we just moved to xcode 14 didn't we ? So xcode 12 is now 2 versions back. >> What you could try is to take a repo WITHOUT the new version of harfbuzz (ie one without your PR), >> remove the disabling of this warning and see if xcode 14 build it - if it does, then the issue is resolved by >> the new xcode and we may still need it for the new change. If the problem is still there with xcode 14 and the old (ie current existing) code, then its resolved by the hb update and we definitely don't need it. > > @prrace Makes sense! Thank you for the info about how this can be double-checked. I'll check and update the disabled section accordingly. With existing harfbuzz v7.2.0 (without the update) + Xcode 14 build passes which implies that the issue was resolved on Xcode 14 and not harfbuzz. Hence adding back `range-loop-analysis` disabled warning. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1372245358 From rriggs at openjdk.org Wed Oct 25 22:00:31 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 25 Oct 2023 22:00:31 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v7] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix copyright year and indentation Suggestions to complete the descriptions of the createXXXJavaProcessBuilder methods. test/lib/jdk/test/lib/process/ProcessTools.java line 505: > 503: * @return The ProcessBuilder instance representing the java command. > 504: */ > 505: public static ProcessBuilder createTestJavaProcessBuilder(List command) { Include the same description of other properties that are included in creating the ProcessBuilder... ``` * Unless the "test.noclasspath" property is "true" * the classpath property "java.class.path" is appended to the command line and * the environment of the ProcessBuilder is modified to remove "CLASSPATH". * If the property "test.thread.factory" is provided the command args are * updated and appended to invoke ProcessTools main() and provide the * name of the thread factory. * The "-Dtest.thread.factory" is appended to the arguments with the thread factory value. * The remaining command args are scanned for unsupported options and * are appended to the ProcessBuilder. test/lib/jdk/test/lib/process/ProcessTools.java line 520: > 518: * @return The ProcessBuilder instance representing the java command. > 519: */ > 520: public static ProcessBuilder createTestJavaProcessBuilder(String... command) { Include the same description of other properties that are included in creating the ProcessBuilder... * Unless the "test.noclasspath" property is "true" * the classpath property "java.class.path" is appended to the command line and * the environment of the ProcessBuilder is modified to remove "CLASSPATH". * If the property "test.thread.factory" is provided the command args are * updated and appended to invoke ProcessTools main() and provide the * name of the thread factory. * The "-Dtest.thread.factory" is appended to the arguments with the thread factory value. * The remaining command args are scanned for unsupported options and * are appended to the ProcessBuilder. test/lib/jdk/test/lib/process/ProcessTools.java line 538: > 536: * it in combination with @requires vm.flagless JTREG > 537: * anotation as to not waste energy and test resources. > 538: * Consider adding this description of what this method does. Suggestion: * Unless the "test.noclasspath" property is "true" * the classpath property "java.class.path" is appended to the command line and * the environment of the ProcessBuilder is modified to remove "CLASSPATH". * If the property "test.thread.factory" is provided the command args are * updated and appended to invoke ProcessTools main() and provide the * name of the thread factory. * The "-Dtest.thread.factory" is appended to the arguments with the thread factory value. * The remaining command args are scanned for unsupported options and * are appended to the ProcessBuilder. test/lib/jdk/test/lib/process/ProcessTools.java line 560: > 558: * it in combination with @requires vm.flagless JTREG > 559: * anotation as to not waste energy and test resources. > 560: * Suggestion: * Unless the "test.noclasspath" property is "true" * the classpath property "java.class.path" is appended to the command line and * the environment of the ProcessBuilder is modified to remove "CLASSPATH". * If the property "test.thread.factory" is provided the command args are * updated and appended to invoke ProcessTools main() and provide the * name of the thread factory. * The "-Dtest.thread.factory" is appended to the arguments with the thread factory value. * The remaining command args are scanned for unsupported options and * are appended to the ProcessBuilder. ------------- PR Review: https://git.openjdk.org/jdk/pull/15452#pullrequestreview-1698308785 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1372364800 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1372364171 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1372361862 PR Review Comment: https://git.openjdk.org/jdk/pull/15452#discussion_r1372362333 From prr at openjdk.org Wed Oct 25 23:27:37 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 25 Oct 2023 23:27:37 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. I eyeballed this but I also ran all our automated tests on all platforms, I don't know that I could be sure none of these were needed without doing that. If we ever need to export any of these in the future it is easy enough to add it back. src/java.desktop/share/native/common/font/sunfontids.h line 86: > 84: > 85: /* Note: we share variable in the context of fontmanager lib > 86: but we need access method to use it from separate rasterizer lib */ That comment had nothing to do with the rasterizer OpenJDK project which wasn't even about font rasterisation. I think this refers to the closed source font rasteriser now removed. Anyway I don't think the comment is important enough to insist on keeping it. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/13261#pullrequestreview-1698410666 PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1372412452 From prr at openjdk.org Wed Oct 25 23:42:08 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 25 Oct 2023 23:42:08 GMT Subject: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4] In-Reply-To: References: Message-ID: > 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request incrementally with one additional commit since the last revision: indentation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15476/files - new: https://git.openjdk.org/jdk/pull/15476/files/2f759caf..c05f547d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15476&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15476.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15476/head:pull/15476 PR: https://git.openjdk.org/jdk/pull/15476 From jdv at openjdk.org Thu Oct 26 02:30:31 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 26 Oct 2023 02:30:31 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 19:37:37 GMT, Harshitha Onkar wrote: >> @prrace Makes sense! Thank you for the info about how this can be double-checked. I'll check and update the disabled section accordingly. > > With existing harfbuzz v7.2.0 (without the update) + Xcode 14 build passes which implies that the issue was resolved on Xcode 14 and not harfbuzz. Hence adding back `range-loop-analysis` disabled warning. Since we know the reason for which this flag was added. We should capture it in a comment, so that in future we will have faster way of analyzing it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1372502781 From serb at openjdk.org Thu Oct 26 05:15:58 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 26 Oct 2023 05:15:58 GMT Subject: RFR: 8318850: Duplicate code in the LCMSImageLayout Message-ID: <5zipqunk528ENvO-I0VJ6RuSD3dNfXJZigxUUrWYux4=.95e236fd-a2cb-4aac-af6b-d9ab581d577a@github.com> Small cleanup: * The code to handle the TYPE_XBYTE_XX and TYPE_BYTE_GRAY in the LCMSImageLayout class is mostly identical, there is only one difference in offset calculation int firstBand = byteRaster.getSampleModel().getNumBands() - 1; l.offset = byteRaster.getDataOffset(firstBand); or l.offset = byteRaster.getDataOffset(0); But since the TYPE_BYTE_GRAY has only one band, both codes calculate the same value. so we can simply remove the special branch for TYPE_BYTE_GRAY * the PREMUL_SH method is replaced by the constant PREMUL since we always pass the "1" as a parameter ------------- Commit messages: - Update VerifyNumBands.java - 8318850: Duplicate code in the LCMSImageLayout Changes: https://git.openjdk.org/jdk/pull/16371/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16371&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318850 Stats: 75 lines in 2 files changed: 57 ins; 11 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/16371.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16371/head:pull/16371 PR: https://git.openjdk.org/jdk/pull/16371 From duke at openjdk.org Thu Oct 26 06:11:50 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Thu, 26 Oct 2023 06:11:50 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v4] In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Made thread safe ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16281/files - new: https://git.openjdk.org/jdk/pull/16281/files/56a06f12..8345c87b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16281&range=02-03 Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/16281.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16281/head:pull/16281 PR: https://git.openjdk.org/jdk/pull/16281 From djelinski at openjdk.org Thu Oct 26 06:15:42 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 26 Oct 2023 06:15:42 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: <-9EtGVh5_hh_GdemaABB2-oB6eK3dKRmOMyTUxq--yk=.305d3f08-5082-4110-aebc-6d01f76346ad@github.com> On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1780474713 From djelinski at openjdk.org Thu Oct 26 06:15:45 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 26 Oct 2023 06:15:45 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Wed, 25 Oct 2023 23:23:19 GMT, Phil Race wrote: >> Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: >> >> - Revert "Remove Color_initIDs" >> >> This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. >> - Revert "Remove KeyboardFocusManager_initIDs" >> >> This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. >> - Revert "Remove Rectangle_initIDs" >> >> This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. >> - Revert "Remove Button_initIDs" >> >> This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. >> - Revert "Remove FileDialog_initIDs" >> >> This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. >> - Revert "Remove TextField_initIDs" >> >> This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. >> - Revert "Update copyright" >> >> This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. > > src/java.desktop/share/native/common/font/sunfontids.h line 86: > >> 84: >> 85: /* Note: we share variable in the context of fontmanager lib >> 86: but we need access method to use it from separate rasterizer lib */ > > That comment had nothing to do with the rasterizer OpenJDK project which wasn't even about font rasterisation. I think this refers to the closed source font rasteriser now removed. Anyway I don't think the comment is important enough to insist on keeping it. good to know, thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1372632269 From djelinski at openjdk.org Thu Oct 26 06:15:46 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 26 Oct 2023 06:15:46 GMT Subject: Integrated: 8305321: Remove unused exports in java.desktop In-Reply-To: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: <2dKOvRVBbTHB3TIq-Dp9Gau9mRtVQwhPRtmk4bkCGFU=.4112fe02-bfae-4841-b2a4-d076380e8373@github.com> On Fri, 31 Mar 2023 07:34:50 GMT, Daniel Jeli?ski wrote: > Please review this patch that removes a number of unused exports from java.desktop native libraries. > > In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: > - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. > - removed `colorValueID` in X11Color; that field was not used. > - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. > > The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. > > The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. > > Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. This pull request has now been integrated. Changeset: 723db2dc Author: Daniel Jeli?ski URL: https://git.openjdk.org/jdk/commit/723db2dc8651efb9e5da7754cbefb80f4171a367 Stats: 55 lines in 17 files changed: 3 ins; 21 del; 31 mod 8305321: Remove unused exports in java.desktop Reviewed-by: aivanov, prr ------------- PR: https://git.openjdk.org/jdk/pull/13261 From tr at openjdk.org Thu Oct 26 10:19:45 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 26 Oct 2023 10:19:45 GMT Subject: RFR: 5108458: JTable does not properly layout its content Message-ID: <5cXVB1i8v2zt-F0c7Of8YgcOPX6lyEbmSR9ZxNklw8c=.664b54cc-5439-4680-8992-f20b58da0e91@github.com> Table contents does not follow right-left Orientation when Max width of columns are set. This is due to not considering the offset in `x position` while painting table grid and table cell. The fix handles the offset and adjust the x position for each paint, similar to how header is painted. The fix is applied to both Basic and Synth Look and Feel. The fix is verified for all Look and Feel manually and test verifies on Metal L&F since automatic test cannot be generalized throughout other Look and Feel. CI tested is green for regression check and test check. ------------- Commit messages: - Synth fix - Fix + Test Changes: https://git.openjdk.org/jdk/pull/16374/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16374&range=00 Issue: https://bugs.openjdk.org/browse/JDK-5108458 Stats: 293 lines in 3 files changed: 284 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/16374.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16374/head:pull/16374 PR: https://git.openjdk.org/jdk/pull/16374 From djelinski at openjdk.org Thu Oct 26 10:41:42 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 26 Oct 2023 10:41:42 GMT Subject: RFR: 8318091: Remove empty initIDs functions Message-ID: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> The removed functions are empty on all platforms. This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. Client libs tests passed. ------------- Commit messages: - Remove TextField_initIDs - Remove FileDialog_initIDs - Remove Button_initIDs - Remove Rectangle_initIDs - Remove KeyboardFocusManager_initIDs - Remove Color_initIDs Changes: https://git.openjdk.org/jdk/pull/16372/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16372&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318091 Stats: 364 lines in 17 files changed: 3 ins; 348 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/16372.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16372/head:pull/16372 PR: https://git.openjdk.org/jdk/pull/16372 From tr at openjdk.org Thu Oct 26 10:42:52 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 26 Oct 2023 10:42:52 GMT Subject: RFR: 5108458: JTable does not properly layout its content [v2] In-Reply-To: <5cXVB1i8v2zt-F0c7Of8YgcOPX6lyEbmSR9ZxNklw8c=.664b54cc-5439-4680-8992-f20b58da0e91@github.com> References: <5cXVB1i8v2zt-F0c7Of8YgcOPX6lyEbmSR9ZxNklw8c=.664b54cc-5439-4680-8992-f20b58da0e91@github.com> Message-ID: > Table contents does not follow right-left Orientation when Max width of columns are set. This is due to not considering the offset in `x position` while painting table grid and table cell. The fix handles the offset and adjust the x position for each paint, similar to how header is painted. The fix is applied to both Basic and Synth Look and Feel. > The fix is verified for all Look and Feel manually and test verifies on Metal L&F since automatic test cannot be generalized throughout other Look and Feel. > CI tested is green for regression check and test check. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Synth update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16374/files - new: https://git.openjdk.org/jdk/pull/16374/files/342b644c..dbdc6e29 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16374&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16374&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16374.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16374/head:pull/16374 PR: https://git.openjdk.org/jdk/pull/16374 From aivanov at openjdk.org Thu Oct 26 10:58:33 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 26 Oct 2023 10:58:33 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v4] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Thu, 26 Oct 2023 06:11:50 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. >> Please review and let me know your suggestions, if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Made thread safe Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1699301614 From aivanov at openjdk.org Thu Oct 26 11:25:46 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 26 Oct 2023 11:25:46 GMT Subject: RFR: 8305321: Remove unused exports in java.desktop [v5] In-Reply-To: References: <5iIFg0d_PiJrYfcyLUbZmxZPfu9iuN5aOqxPpsWvt_I=.732a59c0-ec31-4a7b-a257-49a3f7c4f467@github.com> Message-ID: On Fri, 13 Oct 2023 15:19:53 GMT, Daniel Jeli?ski wrote: >> Please review this patch that removes a number of unused exports from java.desktop native libraries. >> >> In most cases I removed JNIEXPORT from methods and variables that are only used within a single shared library. Other than that: >> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I could tell, rasterizer project is dead now, but if that's incorrect I can restore that export. >> - removed `colorValueID` in X11Color; that field was not used. >> - removed `J2dTraceInit` from header file. That method is only used internally by `J2dTraceImpl`. >> >> The methods `Transform_GetInfo` and `Transform_transform` are declared in GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I should move them to where they are used. >> >> The method `img_makePalette`, currently located in `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by `unix/native/common/awt/X11Color.c`; it could be moved to the same directory to avoid exporting the method from libawt. The files `img_colors.[ch]` do not have any references to other files in `cvutils`. >> >> Manually verified that the exports are no longer present after these changes. Tier1-3 and client libs tests still pass. > > Daniel Jeli?ski has updated the pull request incrementally with seven additional commits since the last revision: > > - Revert "Remove Color_initIDs" > > This reverts commit 8a8c9a63de14773905a64a8067ddd68c8a6ab137. > - Revert "Remove KeyboardFocusManager_initIDs" > > This reverts commit 66bd9a136b4c34d7d600ad49ce67fcd060160fb8. > - Revert "Remove Rectangle_initIDs" > > This reverts commit 0d21e361cd92215bbc8bb971b5c3f26898b96a0b. > - Revert "Remove Button_initIDs" > > This reverts commit 423afbf3b61cad504ae10a99ceb02c318f3a83ae. > - Revert "Remove FileDialog_initIDs" > > This reverts commit e66a9ffdda6e451c4298f59786adbd434dd1adb5. > - Revert "Remove TextField_initIDs" > > This reverts commit 0c3b78d27b899d4301f8326f90f1cc36703cbd3d. > - Revert "Update copyright" > > This reverts commit 5808c65e5fbabc08b43da982736b40db87000cb5. I also ran the automated tests and I cross-referenced the imported symbols with exported ones on Windows and Linux. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13261#issuecomment-1780923747 From psadhukhan at openjdk.org Thu Oct 26 12:47:35 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 26 Oct 2023 12:47:35 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v7] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 16:21:05 GMT, Ichiroh Takiguchi wrote: >> "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" >> https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf >> It refers windgi.h >> https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica >> >> Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) >> >> Additional change: >> Special character `\line` should `\n` >> >> Additional information: >> >> Add 2 hash tables >> - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name >> - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` >> >> When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. >> When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. >> If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. >> >> If `f` control word is used without `fcharset`, `translationTable` char array is used. >> If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). >> >> **Note:** Following GitHub actions were failed >> linux-cross-compile / build (riscv64), I opened following JBS. >>> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed > > Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision: > > 6928542: Chinese characters in RTF are not decoded For me the added regression test still fails with the fix in WIndows 10...anything I need to do more as a prerequisite? Read data^M =========^M Gr\\u00fcezi - Switzerland 0^M \\u0082\\u00b1\\u0082\\u00f1\\u0082\\u00c9\\u0082\\u00bf\\u0082\\u00cd - Japanese 128^M \\u00be\\u00c8\\u00b3\\u00e7\\u00c7\\u00cf\\u00bc\\u00bc\\u00bf\\u00e4 - Korean 129^M \\u00c4\\u00e3\\u00ba\\u00c3 - China 134^M \\u00bbO\\u00c6W - Traditional Chinese - Taiwan 136^M \\u00e3\\u00e5\\u00e9\\u00e1 \\u00f3\\u00ef\\u00f5 - Greek 161^M A\\u00f0a\\u00e7 - Turkish (Tree) 162^M \\u00fe - Vietnam currency 163^M \\u00f9\\u00c8\\u00d1\\u00ec\\u00e5\\u00c9\\u00ed - Hebrew 177^M \\u00e3\\u00d1\\u00cd\\u00c8\\u00c7 - Arabic 178^M A\\u00e8i\\u00fb - Lithuanian (Thank you) 186^M \\u00c7\\u00e4\\u00f0\\u00e0\\u00e2\\u00f1\\u00f2\\u00e2\\u00f3\\u00e9\\u00f2\\u00e5 - Russian 204^M \\u00ca\\u00c7\\u00d1\\u00ca\\u00b4\\u00d5 - Thailand 222^M cze\\uc48f - Polish 238^M ^M Expected data^M =============^M Gr\\u00fcezi - Switzerland 0^M \\u3053\\u3093\\u306b\\u3061\\u306f - Japanese 128^M \\uc548\\ub155\\ud558\\uc138\\uc694 - Korean 129^M \\u4f60\\u597d - China 134^M \\u81fa\\u7063 - Traditional Chinese - Taiwan 136^M \\u03b3\\u03b5\\u03b9\\u03b1 \\u03c3\\u03bf\\u03c5 - Greek 161^M A\\u011fa\\u00e7 - Turkish (Tree) 162^M \\u20ab - Vietnam currency 163^M \\u05e9\\u05b8\\u05c1\\u05dc\\u05d5\\u05b9\\u05dd - Hebrew 177^M \\u0645\\u0631\\u062d\\u0628\\u0627 - Arabic 178^M A\\u010di\\u016b - Lithuanian (Thank you) 186^M \\u0417\\u0434\\u0440\\u0430\\u0432\\u0441\\u0442\\u0432\\u0443\\u0439\\u0442\\u0435 - Russian 204^M \\u0e2a\\u0e27\\u0e31\\u0e2a\\u0e14\\u0e35 - Thailand 222^M cze\\u015b\\u0107 - Polish 238^M ^M java.lang.RuntimeException: Test failed^M at RTFReadFontCharsetTest.main(RTFReadFontCharsetTest.java:114)^ ------------- PR Comment: https://git.openjdk.org/jdk/pull/13553#issuecomment-1781050285 From lkorinth at openjdk.org Thu Oct 26 15:33:38 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 26 Oct 2023 15:33:38 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v7] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix copyright year and indentation Would it be okay if we handle the new method documentation in a separate pull request? After applying your changes, I also noted that the existing description `The command line will be like: {test.jdk}/bin/java {test.vm.opts} {test.java.opts} cmds` is not only incorrect (or at least incomplete), but now also clashes with the added description. I then removed the sentence, but after I did that I also found out that similar wording exist in `executeTestJvm` and I fear that if I continue to pull strings, I will create more and more changes that you will have opinions on. Is it all right if we push what we have now, and that I create a new pull requests with these improvements in documentation that are actually not related to the changes in this pull request? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1781359450 From rriggs at openjdk.org Thu Oct 26 16:29:40 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 26 Oct 2023 16:29:40 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v7] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix copyright year and indentation ok, to correct the javadoc in a subsequent PR. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15452#pullrequestreview-1700061972 From dmarkov at openjdk.org Thu Oct 26 18:05:36 2023 From: dmarkov at openjdk.org (Dmitry Markov) Date: Thu, 26 Oct 2023 18:05:36 GMT Subject: RFR: 8169475 : WheelModifier.java fails by timeout [v4] In-Reply-To: References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Thu, 26 Oct 2023 06:11:50 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. >> Please review and let me know your suggestions, if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Made thread safe Marked as reviewed by dmarkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1700218268 From honkar at openjdk.org Thu Oct 26 18:39:19 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 26 Oct 2023 18:39:19 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v4] In-Reply-To: References: Message-ID: > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: compiler warning flag info added as comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16322/files - new: https://git.openjdk.org/jdk/pull/16322/files/4befbca0..4e691c7e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=02-03 Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From honkar at openjdk.org Thu Oct 26 18:39:21 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 26 Oct 2023 18:39:21 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v2] In-Reply-To: References: Message-ID: On Thu, 26 Oct 2023 02:27:25 GMT, Jayathirth D V wrote: >> With existing harfbuzz v7.2.0 (without the update) + Xcode 14 build passes which implies that the issue was resolved on Xcode 14 and not harfbuzz. Hence adding back `range-loop-analysis` disabled warning. > > Since we know the reason for which this flag was added. > We should capture it in a comment, so that in future we will have faster way of analyzing it. Good point! Added the details as comment. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16322#discussion_r1373619854 From prr at openjdk.org Thu Oct 26 19:08:30 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 26 Oct 2023 19:08:30 GMT Subject: RFR: 8318850: Duplicate code in the LCMSImageLayout In-Reply-To: <5zipqunk528ENvO-I0VJ6RuSD3dNfXJZigxUUrWYux4=.95e236fd-a2cb-4aac-af6b-d9ab581d577a@github.com> References: <5zipqunk528ENvO-I0VJ6RuSD3dNfXJZigxUUrWYux4=.95e236fd-a2cb-4aac-af6b-d9ab581d577a@github.com> Message-ID: <_8VKEoZ7Ay_QCcLkG_h464T8GVvu9gIlBJmlb1c45hs=.a58ee2f5-b40b-406f-8bc5-c5d787c52493@github.com> On Thu, 26 Oct 2023 01:14:57 GMT, Sergey Bylokhov wrote: > Small cleanup: > * The code to handle the TYPE_XBYTE_XX and TYPE_BYTE_GRAY in the LCMSImageLayout class is mostly identical, there is only one difference in offset calculation > > int firstBand = byteRaster.getSampleModel().getNumBands() - 1; > l.offset = byteRaster.getDataOffset(firstBand); > or > l.offset = byteRaster.getDataOffset(0); > > But since the TYPE_BYTE_GRAY has only one band, both codes calculate the same value. so we can simply remove the special branch for TYPE_BYTE_GRAY > > * the PREMUL_SH method is replaced by the constant PREMUL since we always pass the "1" as a parameter looks fine. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16371#pullrequestreview-1700467141 From prr at openjdk.org Thu Oct 26 19:28:33 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 26 Oct 2023 19:28:33 GMT Subject: RFR: 8318091: Remove empty initIDs functions In-Reply-To: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> References: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> Message-ID: On Thu, 26 Oct 2023 06:56:16 GMT, Daniel Jeli?ski wrote: > The removed functions are empty on all platforms. > > This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. > > Client libs tests passed. Marked as reviewed by prr (Reviewer). So this looks OK. The main thing I would worry about is that there isn't some code path which needs the call to Toolkit.loadLibraries(), wasn't doing it itself, and gets by only because the libraries were loaded by one of these calls being removed. It is difficult to prove there is no such case. Tests may not be 100% coverage of all code paths. Of course in such a case it is really a bug in that other code path, so if it shows up the fix would likely be there rather than reverting some part of this change. ------------- PR Review: https://git.openjdk.org/jdk/pull/16372#pullrequestreview-1700500301 PR Comment: https://git.openjdk.org/jdk/pull/16372#issuecomment-1781769779 From achung at openjdk.org Thu Oct 26 23:08:59 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 26 Oct 2023 23:08:59 GMT Subject: RFR: 8316028: Update FreeType to 2.13.2 Message-ID: Updating freetype mach5 build is green ------------- Commit messages: - fix whitespace and tabs - update freetype Changes: https://git.openjdk.org/jdk/pull/16385/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16385&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316028 Stats: 5484 lines in 100 files changed: 1565 ins; 2060 del; 1859 mod Patch: https://git.openjdk.org/jdk/pull/16385.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16385/head:pull/16385 PR: https://git.openjdk.org/jdk/pull/16385 From jdv at openjdk.org Fri Oct 27 04:22:35 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 27 Oct 2023 04:22:35 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v4] In-Reply-To: References: Message-ID: On Thu, 26 Oct 2023 18:39:19 GMT, Harshitha Onkar wrote: >> Harfbuzz upgraded from 7.2.0 to 8.2.2 >> >> - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh >> - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh >> - 173 files modified. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > compiler warning flag info added as comment LGTM ------------- Marked as reviewed by jdv (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16322#pullrequestreview-1700974480 From jdv at openjdk.org Fri Oct 27 05:58:39 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 27 Oct 2023 05:58:39 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding Message-ID: We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. With updated code ran all awt and imageio tests in CI and it is green. ------------- Commit messages: - 8318951: Additional negative value check in JPEG decoding Changes: https://git.openjdk.org/jdk/pull/16390/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16390&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318951 Stats: 8 lines in 2 files changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16390.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16390/head:pull/16390 PR: https://git.openjdk.org/jdk/pull/16390 From mbaesken at openjdk.org Fri Oct 27 07:55:03 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Oct 2023 07:55:03 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return Message-ID: There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. ------------- Commit messages: - JDK-8318955 Changes: https://git.openjdk.org/jdk/pull/16392/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16392&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318955 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16392.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16392/head:pull/16392 PR: https://git.openjdk.org/jdk/pull/16392 From lkorinth at openjdk.org Fri Oct 27 08:50:47 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 27 Oct 2023 08:50:47 GMT Subject: Integrated: 8315097: Rename createJavaProcessBuilder In-Reply-To: References: Message-ID: On Mon, 28 Aug 2023 15:54:08 GMT, Leo Korinth wrote: > This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. > > This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. This pull request has now been integrated. Changeset: d52a995f Author: Leo Korinth URL: https://git.openjdk.org/jdk/commit/d52a995f35de26c2cc4074297a75141e4a363e1b Stats: 1574 lines in 560 files changed: 44 ins; 10 del; 1520 mod 8315097: Rename createJavaProcessBuilder Reviewed-by: lmesnik, dholmes, rriggs, stefank ------------- PR: https://git.openjdk.org/jdk/pull/15452 From lkorinth at openjdk.org Fri Oct 27 09:00:48 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 27 Oct 2023 09:00:48 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v7] In-Reply-To: References: Message-ID: On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to `createTestJavaProcessBuilder`. Both are implemented through a private `createJavaProcessBuilder`. It also updates the java doc. >> >> This is so that it should be harder to by mistake use `createLimitedTestJavaProcessBuilder` that is problematic because it will not forward JVM flags to the tested JVM. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix copyright year and indentation Thanks, see: https://bugs.openjdk.org/browse/JDK-8318962 ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1782552641 From duke at openjdk.org Fri Oct 27 10:42:49 2023 From: duke at openjdk.org (null) Date: Fri, 27 Oct 2023 10:42:49 GMT Subject: RFR: 8317287: [macos14] InterJVMGetDropSuccessTest.java: Child VM: abnormal termination Message-ID: <9MoZ-LGXMsGUZtaExLSZKz0lQ6msanXuDBbUG7cI2d8=.25608504-5f64-4d89-9182-583d62c1bfde@github.com> The root cause of the bug is because mousePress() method is invoked before mouseMove() event is completely processed causing the drag & drop behavior not being able to be recognized properly. This in turn makes the method dragSourceListener.isDropFinished() returns false and fail the test. To fix this, setAutoWaitForIdle(true) and Thread.Sleep is called to make sure the mouseMove() event is processed completely before moving to execute the mousePress() method. JBS issue: [JDK-8317287](https://bugs.openjdk.org/browse/JDK-8317287) ------------- Commit messages: - [macos14] InterJVMGetDropSuccessTest.java: Child VM: abnormal termination Changes: https://git.openjdk.org/jdk/pull/16396/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16396&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8317287 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16396.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16396/head:pull/16396 PR: https://git.openjdk.org/jdk/pull/16396 From aivanov at openjdk.org Fri Oct 27 11:00:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 27 Oct 2023 11:00:38 GMT Subject: RFR: 8318091: Remove empty initIDs functions In-Reply-To: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> References: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> Message-ID: On Thu, 26 Oct 2023 06:56:16 GMT, Daniel Jeli?ski wrote: > The removed functions are empty on all platforms. > > This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. > > Client libs tests passed. It looks good to me. The only concern I have, similar to Phil, is that peer implementations do not load the toolkit libraries. For this reason, I am for keeping the call to `Toolkit.loadLibraries()` in the static initializer of `java.awt.Button`, `java.awt.FileDialog`, `java.awt.KeyboardFocusManager` and `java.awt.TextField`. src/java.desktop/share/classes/java/awt/Button.java line 128: > 126: static { > 127: /* ensure that the necessary native libraries are loaded */ > 128: Toolkit.loadLibraries(); I think it is safer to preserve loading the toolkit libraries: `Button` is a peered component and I can't see any of the peers loads the libraries. src/java.desktop/share/classes/java/awt/FileDialog.java line 146: > 144: static { > 145: /* ensure that the necessary native libraries are loaded */ > 146: Toolkit.loadLibraries(); The same is here: I see no clear path to load the toolkit libraries from the peers, and peers do have native methods, including `initIDs`. It looks as if peer implementations depend on the fact that the corresponding public API classes ensure the libraries are loaded. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16372#pullrequestreview-1701464849 PR Review Comment: https://git.openjdk.org/jdk/pull/16372#discussion_r1374373100 PR Review Comment: https://git.openjdk.org/jdk/pull/16372#discussion_r1374384221 From djelinski at openjdk.org Fri Oct 27 11:04:36 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 27 Oct 2023 11:04:36 GMT Subject: RFR: 8318091: Remove empty initIDs functions In-Reply-To: References: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> Message-ID: On Fri, 27 Oct 2023 10:26:26 GMT, Alexey Ivanov wrote: >> The removed functions are empty on all platforms. >> >> This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. >> >> Client libs tests passed. > > src/java.desktop/share/classes/java/awt/Button.java line 128: > >> 126: static { >> 127: /* ensure that the necessary native libraries are loaded */ >> 128: Toolkit.loadLibraries(); > > I think it is safer to preserve loading the toolkit libraries: `Button` is a peered component and I can't see any of the peers loads the libraries. Button extends Component, which loads libraries > src/java.desktop/share/classes/java/awt/FileDialog.java line 146: > >> 144: static { >> 145: /* ensure that the necessary native libraries are loaded */ >> 146: Toolkit.loadLibraries(); > > The same is here: I see no clear path to load the toolkit libraries from the peers, and peers do have native methods, including `initIDs`. > > It looks as if peer implementations depend on the fact that the corresponding public API classes ensure the libraries are loaded. FileDialog extends Dialog, which loads libraries ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16372#discussion_r1374410255 PR Review Comment: https://git.openjdk.org/jdk/pull/16372#discussion_r1374410900 From aivanov at openjdk.org Fri Oct 27 11:12:36 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 27 Oct 2023 11:12:36 GMT Subject: RFR: 8318091: Remove empty initIDs functions In-Reply-To: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> References: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> Message-ID: On Thu, 26 Oct 2023 06:56:16 GMT, Daniel Jeli?ski wrote: > The removed functions are empty on all platforms. > > This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. > > Client libs tests passed. > Button extends Component, which loads libraries > FileDialog extends Dialog, which loads libraries Then it's handled, obviously. `TextField` falls into the same category. And `KeyboardFocusManager` will also load the libraries because it depends on the `Toolkit` class which, in its turn, loads the libraries. We're good then, no further changes needed. Thank you! ------------- PR Comment: https://git.openjdk.org/jdk/pull/16372#issuecomment-1782729139 From duke at openjdk.org Fri Oct 27 11:51:43 2023 From: duke at openjdk.org (null) Date: Fri, 27 Oct 2023 11:51:43 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length Message-ID: JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. import javax.sound.midi.*; public class MidiTest { public static class RawMidiMessage extends MidiMessage { public RawMidiMessage(byte[] data) { super(data); } @Override public Object clone() { return new RawMidiMessage(this.getMessage()); } } public static void main(String[] args) { var deviceInfos = MidiSystem.getMidiDeviceInfo(); for (var info : deviceInfos) { try (MidiDevice device = MidiSystem.getMidiDevice(info)) { if (device.getMaxReceivers() != 0) { System.out.println("Open MIDI port: " + info.getName()); device.open(); Receiver receiver = device.getReceiver(); // Send two sysex messages at once receiver.send(new RawMidiMessage(new byte[]{ (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 }), -1); // Send another sysex message receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); } } catch (MidiUnavailableException e) { e.printStackTrace(); } } } } The expected messages received should be the following three messages F0 7D 01 F7 F0 7D 02 F7 F0 7D 03 F7 But acually four messages was received with the second message repeated twice. F0 7D 01 F7 F0 7D 02 F7 F0 7D 03 F7 F0 7D 02 F7 To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buffer hasn't been freed due to an error. It seems that the patch may also resolve JDK-8250667. The extra bytes in the second sysex message is the same issue as JDK-8074211. I didn't figure out how the scrambled data generated in the third sysex message, but all the messages are correct after applying the patch. ------------- Commit messages: - Resolve the message size issue when sending SysexMessage on Windows Changes: https://git.openjdk.org/jdk/pull/16399/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8074211 Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16399.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16399/head:pull/16399 PR: https://git.openjdk.org/jdk/pull/16399 From javasound-dev at bome.com Fri Oct 27 16:03:37 2023 From: javasound-dev at bome.com (Florian Bomers) Date: Fri, 27 Oct 2023 18:03:37 +0200 Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length In-Reply-To: References: Message-ID: <2972033c-b724-ec90-e9d6-6754ae2df178@bome.com> Interesting! I've reviewed this fix, it looks good to me. For drivers that send Sys-Ex asynchronously, the dwBufferLength field /might /be read after the code sets it back to the temporary variable bufferLength. Trying to account for that would be much more work... But this fix will improve matters in any case. Florian On 27.10.2023 13:51, null wrote: > JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. > > The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. > > > import javax.sound.midi.*; > > public class MidiTest { > public static class RawMidiMessage extends MidiMessage { > public RawMidiMessage(byte[] data) { > super(data); > } > > @Override > public Object clone() { > return new RawMidiMessage(this.getMessage()); > } > } > > public static void main(String[] args) { > var deviceInfos = MidiSystem.getMidiDeviceInfo(); > for (var info : deviceInfos) { > try (MidiDevice device = MidiSystem.getMidiDevice(info)) { > if (device.getMaxReceivers() != 0) { > System.out.println("Open MIDI port: " + info.getName()); > device.open(); > Receiver receiver = device.getReceiver(); > // Send two sysex messages at once > receiver.send(new RawMidiMessage(new byte[]{ > (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, > (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 > }), -1); > // Send another sysex message > receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); > } > } catch (MidiUnavailableException e) { > e.printStackTrace(); > } > } > } > } > > > The expected messages received should be the following three messages > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > > > But acually four messages was received with the second message repeated twice. > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > F0 7D 02 F7 > > > To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buffer hasn't been freed due to an error. > > It seems that the patch may also resolve JDK-8250667. The extra bytes in the second sysex message is the same issue as JDK-8074211. I didn't figure out how the scrambled data generated in the third sysex message, but all the messages are correct after applying the patch. > > ------------- > > Commit messages: > - Resolve the message size issue when sending SysexMessage on Windows > > Changes:https://git.openjdk.org/jdk/pull/16399/files > Webrev:https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=00 > Issue:https://bugs.openjdk.org/browse/JDK-8074211 > Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod > Patch:https://git.openjdk.org/jdk/pull/16399.diff > Fetch: git fetchhttps://git.openjdk.org/jdk.git pull/16399/head:pull/16399 > > PR:https://git.openjdk.org/jdk/pull/16399 -- Florian Bomers Bome Software /everything sounds./ https://www.bome.com Bome Software GmbH & Co KG Gesellschafterin: Petra-Kelly-Str. 15 Bome Komplement?r GmbH 80797 M?nchen, Germany Gesch?ftsf?hrung: Florian B?mers Amtsgericht M?nchen HRA95502 Amtsgericht M?nchen HRB185574 LinkedIn YouTube Facebook Instagram -------------- next part -------------- An HTML attachment was scrubbed... URL: From vdyakov at openjdk.org Fri Oct 27 16:10:33 2023 From: vdyakov at openjdk.org (Victor Dyakov) Date: Fri, 27 Oct 2023 16:10:33 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 05:54:04 GMT, Jayathirth D V wrote: > We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c > > We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. > > With updated code ran all awt and imageio tests in CI and it is green. @azvegint @prsadhuk please review ------------- PR Comment: https://git.openjdk.org/jdk/pull/16390#issuecomment-1783166178 From djelinski at openjdk.org Fri Oct 27 16:12:44 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 27 Oct 2023 16:12:44 GMT Subject: Integrated: 8318091: Remove empty initIDs functions In-Reply-To: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> References: <84AlWF9KBFAsGaFAXP17ms-spHQMxpUxi4l7NCJgWAI=.4fe9eb55-b148-403d-86b7-36af42d28b79@github.com> Message-ID: On Thu, 26 Oct 2023 06:56:16 GMT, Daniel Jeli?ski wrote: > The removed functions are empty on all platforms. > > This patch also removes calls to `Toolkit.loadLibraries();` in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded. > > Client libs tests passed. This pull request has now been integrated. Changeset: c593f8bf Author: Daniel Jeli?ski URL: https://git.openjdk.org/jdk/commit/c593f8bf59dbe5d002c3b843796e54db6dd69bec Stats: 364 lines in 17 files changed: 3 ins; 348 del; 13 mod 8318091: Remove empty initIDs functions Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16372 From serb at openjdk.org Fri Oct 27 18:24:42 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 27 Oct 2023 18:24:42 GMT Subject: Integrated: 8318850: Duplicate code in the LCMSImageLayout In-Reply-To: <5zipqunk528ENvO-I0VJ6RuSD3dNfXJZigxUUrWYux4=.95e236fd-a2cb-4aac-af6b-d9ab581d577a@github.com> References: <5zipqunk528ENvO-I0VJ6RuSD3dNfXJZigxUUrWYux4=.95e236fd-a2cb-4aac-af6b-d9ab581d577a@github.com> Message-ID: On Thu, 26 Oct 2023 01:14:57 GMT, Sergey Bylokhov wrote: > Small cleanup: > * The code to handle the TYPE_XBYTE_XX and TYPE_BYTE_GRAY in the LCMSImageLayout class is mostly identical, there is only one difference in offset calculation > > int firstBand = byteRaster.getSampleModel().getNumBands() - 1; > l.offset = byteRaster.getDataOffset(firstBand); > or > l.offset = byteRaster.getDataOffset(0); > > But since the TYPE_BYTE_GRAY has only one band, both codes calculate the same value. so we can simply remove the special branch for TYPE_BYTE_GRAY > > * the PREMUL_SH method is replaced by the constant PREMUL since we always pass the "1" as a parameter This pull request has now been integrated. Changeset: d2260146 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/d2260146c9930002e430a874f2585d699dedc155 Stats: 75 lines in 2 files changed: 57 ins; 11 del; 7 mod 8318850: Duplicate code in the LCMSImageLayout Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/16371 From serb at openjdk.org Fri Oct 27 18:38:32 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 27 Oct 2023 18:38:32 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 11:10:45 GMT, Alec Su wrote: > JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. > > The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. > > > import javax.sound.midi.*; > > public class MidiTest { > public static class RawMidiMessage extends MidiMessage { > public RawMidiMessage(byte[] data) { > super(data); > } > > @Override > public Object clone() { > return new RawMidiMessage(this.getMessage()); > } > } > > public static void main(String[] args) { > var deviceInfos = MidiSystem.getMidiDeviceInfo(); > for (var info : deviceInfos) { > try (MidiDevice device = MidiSystem.getMidiDevice(info)) { > if (device.getMaxReceivers() != 0) { > System.out.println("Open MIDI port: " + info.getName()); > device.open(); > Receiver receiver = device.getReceiver(); > // Send two sysex messages at once > receiver.send(new RawMidiMessage(new byte[]{ > (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, > (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 > }), -1); > // Send another sysex message > receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); > } > } catch (MidiUnavailableException e) { > e.printStackTrace(); > } > } > } > } > > > The expected messages received should be the following three messages > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > > > But acually four messages was received with the second message repeated twice. > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > F0 7D 02 F7 > > > To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buffer hasn't been freed due to an error. > > It seems that the patch may also resolve JDK-8250667. The extra bytes in the s... I think the java code in the description can be added as a testcase, even if it works fine before the patch, it is useful that the affected code will be triggered. As an example you can use the tests in the next folder: https://github.com/openjdk/jdk/tree/master/test/jdk/javax/sound ------------- PR Comment: https://git.openjdk.org/jdk/pull/16399#issuecomment-1783346826 From serb at openjdk.org Fri Oct 27 18:50:31 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 27 Oct 2023 18:50:31 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 05:54:04 GMT, Jayathirth D V wrote: > We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c > > We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. > > With updated code ran all awt and imageio tests in CI and it is green. I am not sure in what case this bug can be reproduced, but if it possible to get overflow there in the real app then probably we should skip that bytes in a few steps using small data? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16390#issuecomment-1783360995 From serb at openjdk.org Fri Oct 27 18:53:32 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 27 Oct 2023 18:53:32 GMT Subject: RFR: 8316028: Update FreeType to 2.13.2 In-Reply-To: References: Message-ID: <8M4_Oo55zF7JWCaTc8bI-RaYn8zpZnauD5s3KmYvjpw=.ebf8d882-75fd-4f08-bde2-c09d083e2356@github.com> On Thu, 26 Oct 2023 21:45:46 GMT, Alisen Chung wrote: > Updating freetype > mach5 build is green Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16385#pullrequestreview-1702370331 From honkar at openjdk.org Fri Oct 27 18:59:12 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 27 Oct 2023 18:59:12 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v5] In-Reply-To: References: Message-ID: > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: updated .md file ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16322/files - new: https://git.openjdk.org/jdk/pull/16322/files/4e691c7e..3053354f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=03-04 Stats: 10 lines in 1 file changed: 10 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From prr at openjdk.org Fri Oct 27 19:53:31 2023 From: prr at openjdk.org (Phil Race) Date: Fri, 27 Oct 2023 19:53:31 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v5] In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 18:59:12 GMT, Harshitha Onkar wrote: >> Harfbuzz upgraded from 7.2.0 to 8.2.2 >> >> - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh >> - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh >> - 173 files modified. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > updated .md file Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16322#pullrequestreview-1702445654 From dnguyen at openjdk.org Fri Oct 27 20:11:32 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 27 Oct 2023 20:11:32 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v5] In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 18:59:12 GMT, Harshitha Onkar wrote: >> Harfbuzz upgraded from 7.2.0 to 8.2.2 >> >> - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh >> - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh >> - 173 files modified. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > updated .md file LGTM ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/16322#pullrequestreview-1702474454 From azvegint at openjdk.org Fri Oct 27 20:29:35 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 27 Oct 2023 20:29:35 GMT Subject: RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v3] In-Reply-To: <3cGupG6NYaG7snJMpE0TjngOy0Fv1Xw9Q9NiFnqdVwg=.9810c0ea-10f9-470c-9532-fadddc96a45a@github.com> References: <3cGupG6NYaG7snJMpE0TjngOy0Fv1Xw9Q9NiFnqdVwg=.9810c0ea-10f9-470c-9532-fadddc96a45a@github.com> Message-ID: On Wed, 25 Oct 2023 13:29:01 GMT, Alexey Ivanov wrote: >> This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests. >> >> The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .rows(35) >> .columns(50) >> .testUI(FileChooserSymLinkTest::createTestUI) >> .build() >> .awaitAndCheck(); >> } >> >> >> It's the most streamlined way of creating a manual test. >> >> This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660. > > Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: > > - Amend indentation of nested
  • elements > - Merge master > - 8316025: Update the return type of createTestUI > > PassFailJFrame now supports creating a list of test windows > - Merge branch '8294156-func-manual-TestUI' into 8316025-testUI-SymLinkTest > - 8294156: Allow creating several test windows > > The windows can be positioned in advance, or > a call back PositionWindows interface can be used > to define their positions after the instruction UI > frame is positioned on the screen. > - Use testUI() and builder pattern to create test UI > - Remove trailing whitespace > - Mark the Builder class final > > It's not supposed to be extended. > - Amend message in window closing handler > > The WindowClosingHandler is used both for the instruction > frame and for test UI windows. > Also add blank lines to separate different parts of the class. > - Use invokeOnEDT in getInstructionFrameBounds > - ... and 9 more: https://git.openjdk.org/jdk/compare/c587211b...0f4f67b3 Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15666#pullrequestreview-1702493257 From duke at openjdk.org Fri Oct 27 23:35:40 2023 From: duke at openjdk.org (lawrence.andrews) Date: Fri, 27 Oct 2023 23:35:40 GMT Subject: RFR: 8318580 : "javax/swing/MultiMonitor/MultimonVImage.java failing with Error. Can't find library: /open/test/jdk/java/awt/regtesthelpers" after JDK-8316053 Message-ID: <02Ibmd_1aWhnP0fQCk1cpZtrIp5OR--5HxF2alf3RI8=.785f9c15-704b-401a-b538-ef87943a0507@github.com> 1) Fixed the @library regtesthelpers file path 2) Added @build PassFailJFrame 3) Added a empty line at the end of the file that was missing. ------------- Commit messages: - 8318580 : "javax/swing/MultiMonitor/MultimonVImage.java failing with Error. Can't find library: /open/test/jdk/java/awt/regtesthelpers" after JDK-8316053 Changes: https://git.openjdk.org/jdk/pull/16408/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16408&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318580 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16408.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16408/head:pull/16408 PR: https://git.openjdk.org/jdk/pull/16408 From duke at openjdk.org Sun Oct 29 14:19:03 2023 From: duke at openjdk.org (Alec Su) Date: Sun, 29 Oct 2023 14:19:03 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length [v2] In-Reply-To: References: Message-ID: > JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. > > The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. > > > import javax.sound.midi.*; > > public class MidiTest { > public static class RawMidiMessage extends MidiMessage { > public RawMidiMessage(byte[] data) { > super(data); > } > > @Override > public Object clone() { > return new RawMidiMessage(this.getMessage()); > } > } > > public static void main(String[] args) { > var deviceInfos = MidiSystem.getMidiDeviceInfo(); > for (var info : deviceInfos) { > try (MidiDevice device = MidiSystem.getMidiDevice(info)) { > if (device.getMaxReceivers() != 0) { > System.out.println("Open MIDI port: " + info.getName()); > device.open(); > Receiver receiver = device.getReceiver(); > // Send two sysex messages at once > receiver.send(new RawMidiMessage(new byte[]{ > (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, > (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 > }), -1); > // Send another sysex message > receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); > } > } catch (MidiUnavailableException e) { > e.printStackTrace(); > } > } > } > } > > > The expected messages received should be the following three messages > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > > > But acually four messages was received with the second message repeated twice. > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > F0 7D 02 F7 > > > To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buffer hasn't been freed due to an error. > > It seems that the patch may also resolve JDK-8250667. The extra bytes in the s... Alec Su has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: - Add a testcase for the buffer issue on Windows - Resolve the message size issue when sending SysexMessage on Windows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16399/files - new: https://git.openjdk.org/jdk/pull/16399/files/16918dd5..a6b499f3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=00-01 Stats: 113 lines in 5 files changed: 84 ins; 2 del; 27 mod Patch: https://git.openjdk.org/jdk/pull/16399.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16399/head:pull/16399 PR: https://git.openjdk.org/jdk/pull/16399 From duke at openjdk.org Sun Oct 29 14:19:04 2023 From: duke at openjdk.org (Alec Su) Date: Sun, 29 Oct 2023 14:19:04 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 18:35:33 GMT, Sergey Bylokhov wrote: >> JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. >> >> The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. >> >> >> import javax.sound.midi.*; >> >> public class MidiTest { >> public static class RawMidiMessage extends MidiMessage { >> public RawMidiMessage(byte[] data) { >> super(data); >> } >> >> @Override >> public Object clone() { >> return new RawMidiMessage(this.getMessage()); >> } >> } >> >> public static void main(String[] args) { >> var deviceInfos = MidiSystem.getMidiDeviceInfo(); >> for (var info : deviceInfos) { >> try (MidiDevice device = MidiSystem.getMidiDevice(info)) { >> if (device.getMaxReceivers() != 0) { >> System.out.println("Open MIDI port: " + info.getName()); >> device.open(); >> Receiver receiver = device.getReceiver(); >> // Send two sysex messages at once >> receiver.send(new RawMidiMessage(new byte[]{ >> (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, >> (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 >> }), -1); >> // Send another sysex message >> receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); >> } >> } catch (MidiUnavailableException e) { >> e.printStackTrace(); >> } >> } >> } >> } >> >> >> The expected messages received should be the following three messages >> >> F0 7D 01 F7 >> F0 7D 02 F7 >> F0 7D 03 F7 >> >> >> But acually four messages was received with the second message repeated twice. >> >> F0 7D 01 F7 >> F0 7D 02 F7 >> F0 7D 03 F7 >> F0 7D 02 F7 >> >> >> To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buf... > > I think the java code in the description can be added as a testcase, even if it works fine before the patch, it is useful that the affected code will be triggered. > As an example you can use the tests in the next folder: https://github.com/openjdk/jdk/tree/master/test/jdk/javax/sound Thanks for the suggestions from Florian Bomers and @mrserb. I?ve added a new structure to record the actual buffer length. Therefore the actual buffer length doesn?t need to write back to dwBufferLength. Additionally, The example code is added as a testcase. Please let me know if there are any further improvements needed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16399#issuecomment-1784126362 From duke at openjdk.org Sun Oct 29 14:29:45 2023 From: duke at openjdk.org (Alec Su) Date: Sun, 29 Oct 2023 14:29:45 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length [v3] In-Reply-To: References: Message-ID: > JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. > > The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. > > > import javax.sound.midi.*; > > public class MidiTest { > public static class RawMidiMessage extends MidiMessage { > public RawMidiMessage(byte[] data) { > super(data); > } > > @Override > public Object clone() { > return new RawMidiMessage(this.getMessage()); > } > } > > public static void main(String[] args) { > var deviceInfos = MidiSystem.getMidiDeviceInfo(); > for (var info : deviceInfos) { > try (MidiDevice device = MidiSystem.getMidiDevice(info)) { > if (device.getMaxReceivers() != 0) { > System.out.println("Open MIDI port: " + info.getName()); > device.open(); > Receiver receiver = device.getReceiver(); > // Send two sysex messages at once > receiver.send(new RawMidiMessage(new byte[]{ > (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, > (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 > }), -1); > // Send another sysex message > receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); > } > } catch (MidiUnavailableException e) { > e.printStackTrace(); > } > } > } > } > > > The expected messages received should be the following three messages > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > > > But acually four messages was received with the second message repeated twice. > > F0 7D 01 F7 > F0 7D 02 F7 > F0 7D 03 F7 > F0 7D 02 F7 > > > To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buffer hasn't been freed due to an error. > > It seems that the patch may also resolve JDK-8250667. The extra bytes in the s... Alec Su has updated the pull request incrementally with one additional commit since the last revision: Code cleanup ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16399/files - new: https://git.openjdk.org/jdk/pull/16399/files/a6b499f3..819e2cff Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16399&range=01-02 Stats: 73 lines in 1 file changed: 0 ins; 0 del; 73 mod Patch: https://git.openjdk.org/jdk/pull/16399.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16399/head:pull/16399 PR: https://git.openjdk.org/jdk/pull/16399 From jdv at openjdk.org Mon Oct 30 04:32:33 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 30 Oct 2023 04:32:33 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 18:48:17 GMT, Sergey Bylokhov wrote: > I am not sure in what case this bug can be reproduced, but if it possible to get overflow there in the real app then probably we should skip that bytes in a few steps using small data? @mrserb yes in the current code there is no way we can hit overflow because streambuffer size is 4096 only and all skip_input_data() calls with some length are coming only from IJG and the length data is of 2 Bytes size. So `long num_bytes` cannot overflow in these scenarios. This is more of defense in depth fix for future scenarios. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16390#issuecomment-1784461503 From rschmelter at openjdk.org Mon Oct 30 08:54:32 2023 From: rschmelter at openjdk.org (Ralf Schmelter) Date: Mon, 30 Oct 2023 08:54:32 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 07:48:58 GMT, Matthias Baesken wrote: > There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. Maybe we should throw an OutOfMemoryError in addition, since otherwise the call looks like it has performed the operation. ------------- PR Review: https://git.openjdk.org/jdk/pull/16392#pullrequestreview-1703570726 From mbaesken at openjdk.org Mon Oct 30 09:15:00 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 30 Oct 2023 09:15:00 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: > There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Add JNU_ThrowOutOfMemoryError ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16392/files - new: https://git.openjdk.org/jdk/pull/16392/files/50e969e9..6dbed1aa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16392&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16392&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16392.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16392/head:pull/16392 PR: https://git.openjdk.org/jdk/pull/16392 From mbaesken at openjdk.org Mon Oct 30 09:15:02 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 30 Oct 2023 09:15:02 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Mon, 30 Oct 2023 08:52:04 GMT, Ralf Schmelter wrote: > Maybe we should throw an OutOfMemoryError in addition, since otherwise the call looks like it has performed the operation. Makes probably sense, at other places in the same file it is done this way. I added a JNU_ThrowOutOfMemoryError . ------------- PR Comment: https://git.openjdk.org/jdk/pull/16392#issuecomment-1784771066 From rschmelter at openjdk.org Mon Oct 30 11:52:34 2023 From: rschmelter at openjdk.org (Ralf Schmelter) Date: Mon, 30 Oct 2023 11:52:34 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Mon, 30 Oct 2023 09:15:00 GMT, Matthias Baesken wrote: >> There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add JNU_ThrowOutOfMemoryError Looks good to me. ------------- Marked as reviewed by rschmelter (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16392#pullrequestreview-1703903076 From mbaesken at openjdk.org Mon Oct 30 12:47:32 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 30 Oct 2023 12:47:32 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Mon, 30 Oct 2023 09:15:00 GMT, Matthias Baesken wrote: >> There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add JNU_ThrowOutOfMemoryError Hi Ralf, thanks for the review ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/16392#issuecomment-1785114304 From jwaters at openjdk.org Mon Oct 30 13:23:07 2023 From: jwaters at openjdk.org (Julian Waters) Date: Mon, 30 Oct 2023 13:23:07 GMT Subject: RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v9] In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: <69B1SjaCVySTnL6MTtdu4KFVeI8jKiNqLHTTlCw3Ykw=.c5efe789-23c9-45f5-99c2-e9414478f1bb@github.com> > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. Julian Waters has updated the pull request incrementally with one additional commit since the last revision: Split declaration and assignment in awt_Canvas.cpp ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15096/files - new: https://git.openjdk.org/jdk/pull/15096/files/0566de0c..1742036e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=07-08 Stats: 7 lines in 1 file changed: 0 ins; 1 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/15096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15096/head:pull/15096 PR: https://git.openjdk.org/jdk/pull/15096 From azvegint at openjdk.org Mon Oct 30 15:57:34 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 30 Oct 2023 15:57:34 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 05:54:04 GMT, Jayathirth D V wrote: > We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c > > We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. > > With updated code ran all awt and imageio tests in CI and it is green. Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16390#pullrequestreview-1704512797 From honkar at openjdk.org Mon Oct 30 18:05:04 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 30 Oct 2023 18:05:04 GMT Subject: RFR: JDK-8313643: Update HarfBuzz to 8.2.2 [v6] In-Reply-To: References: Message-ID: > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: .md file update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16322/files - new: https://git.openjdk.org/jdk/pull/16322/files/3053354f..13b62f89 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16322&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16322/head:pull/16322 PR: https://git.openjdk.org/jdk/pull/16322 From prr at openjdk.org Mon Oct 30 20:41:31 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 30 Oct 2023 20:41:31 GMT Subject: RFR: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 05:54:04 GMT, Jayathirth D V wrote: > We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c > > We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. > > With updated code ran all awt and imageio tests in CI and it is green. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16390#pullrequestreview-1705024302 From prr at openjdk.org Mon Oct 30 20:48:31 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 30 Oct 2023 20:48:31 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Mon, 30 Oct 2023 09:15:00 GMT, Matthias Baesken wrote: >> There is an early return in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c that seems to miss a ReleaseIntArrayElements call. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add JNU_ThrowOutOfMemoryError src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c line 2303: > 2301: if (!pRect) { > 2302: (*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT); > 2303: JNU_ThrowOutOfMemoryError(env, "malloc failed"); I think the throw is unnecessary. You will get some incorrect rendering, but that's all. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16392#discussion_r1376781142 From prr at openjdk.org Mon Oct 30 21:32:31 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 30 Oct 2023 21:32:31 GMT Subject: RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length [v3] In-Reply-To: References: Message-ID: On Sun, 29 Oct 2023 14:29:45 GMT, Alec Su wrote: >> JVM attempts to reuse the buffer for sending MIDI out data when the buffer size is enough. It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data. However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. I've tested on Windows 7, 10 and 11. All of them have the same behavior. >> >> The bug cannot be easily reproduced because some MIDI drivers filter out any malformed MIDI data. The example code below create a special case to make sure all MIDI data are legally when the bug is triggered. >> >> >> import javax.sound.midi.*; >> >> public class MidiTest { >> public static class RawMidiMessage extends MidiMessage { >> public RawMidiMessage(byte[] data) { >> super(data); >> } >> >> @Override >> public Object clone() { >> return new RawMidiMessage(this.getMessage()); >> } >> } >> >> public static void main(String[] args) { >> var deviceInfos = MidiSystem.getMidiDeviceInfo(); >> for (var info : deviceInfos) { >> try (MidiDevice device = MidiSystem.getMidiDevice(info)) { >> if (device.getMaxReceivers() != 0) { >> System.out.println("Open MIDI port: " + info.getName()); >> device.open(); >> Receiver receiver = device.getReceiver(); >> // Send two sysex messages at once >> receiver.send(new RawMidiMessage(new byte[]{ >> (byte) 0xF0, 0x7D, 0x01, (byte) 0xF7, >> (byte) 0xF0, 0x7D, 0x02, (byte) 0xF7 >> }), -1); >> // Send another sysex message >> receiver.send(new RawMidiMessage(new byte[]{(byte) 0xF0, 0x7D, 0x03, (byte) 0xF7}), -1); >> } >> } catch (MidiUnavailableException e) { >> e.printStackTrace(); >> } >> } >> } >> } >> >> >> The expected messages received should be the following three messages >> >> F0 7D 01 F7 >> F0 7D 02 F7 >> F0 7D 03 F7 >> >> >> But acually four messages was received with the second message repeated twice. >> >> F0 7D 01 F7 >> F0 7D 02 F7 >> F0 7D 03 F7 >> F0 7D 02 F7 >> >> >> To resolve the issue, I add a new variable to backup the actual buffer size and set `dwBufferLength` of `MIDIHDR` structure to the size of MIDI data. After calling `midiOutLongMsg()`, I restore the original buffer size if the buf... > > Alec Su has updated the pull request incrementally with one additional commit since the last revision: > > Code cleanup > It use `dwBytesRecorded` in `MIDIHDR` structure to indicate the actual size of the data > However, `midiOutLongMsg()` ignores `dwBytesRecorded`, although it did not mentioned in the documentation. This seems to be documented by Microsoft only in the most obscure fashion. If you look at the doc for midiOutPrepareHeader https://learn.microsoft.com/en-us/previous-versions/dd798477(v=vs.85) it says "Before calling the function, set the lpData, dwBufferLength, and dwFlags members of the [MIDIHDR](https://learn.microsoft.com/en-us/previous-versions/dd798449(v=vs.85)) structure" So no mention of dwBytesRecorded. WAVEHDR is a very similar struct to MIDIHDR and if you look at this WAVEHDR doc it says https://learn.microsoft.com/en-us/previous-versions/dd743837(v=vs.85) dwBytesRecorded When the header is used in input, specifies how much data is in the buffer. So I infer the same is true for MIDI Therefore dwBytesRecorded is only used for input and dwBufferLength is what's important for output. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16399#issuecomment-1786077861 From jdv at openjdk.org Tue Oct 31 04:23:41 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 31 Oct 2023 04:23:41 GMT Subject: Integrated: 8318951: Additional negative value check in JPEG decoding In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 05:54:04 GMT, Jayathirth D V wrote: > We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c > > We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need to add additional check for num_bytes here. > > With updated code ran all awt and imageio tests in CI and it is green. This pull request has now been integrated. Changeset: 75ce02fe Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/75ce02fe74e1232bfa8d72b4fdad82ed938ef957 Stats: 8 lines in 2 files changed: 8 ins; 0 del; 0 mod 8318951: Additional negative value check in JPEG decoding Reviewed-by: azvegint, prr ------------- PR: https://git.openjdk.org/jdk/pull/16390 From mbaesken at openjdk.org Tue Oct 31 08:09:32 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 31 Oct 2023 08:09:32 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Mon, 30 Oct 2023 20:45:37 GMT, Phil Race wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> Add JNU_ThrowOutOfMemoryError > > src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c line 2303: > >> 2301: if (!pRect) { >> 2302: (*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT); >> 2303: JNU_ThrowOutOfMemoryError(env, "malloc failed"); > > I think the throw is unnecessary. You will get some incorrect rendering, but that's all. So should I remove the JNU_ThrowOutOfMemoryError ? The calloc in the same file has a JNU_ThrowOutOfMemoryError (but maybe the situation is different there?) . ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16392#discussion_r1377191445 From duke at openjdk.org Tue Oct 31 09:26:10 2023 From: duke at openjdk.org (null) Date: Tue, 31 Oct 2023 09:26:10 GMT Subject: RFR: 8317287: [macos14] InterJVMGetDropSuccessTest.java: Child VM: abnormal termination [v2] In-Reply-To: <9MoZ-LGXMsGUZtaExLSZKz0lQ6msanXuDBbUG7cI2d8=.25608504-5f64-4d89-9182-583d62c1bfde@github.com> References: <9MoZ-LGXMsGUZtaExLSZKz0lQ6msanXuDBbUG7cI2d8=.25608504-5f64-4d89-9182-583d62c1bfde@github.com> Message-ID: > The root cause of the bug is because mousePress() method is invoked before mouseMove() event is completely processed causing the drag & drop behavior not being able to be recognized properly. This in turn makes the method dragSourceListener.isDropFinished() returns false and fail the test. To fix this, setAutoWaitForIdle(true) and Thread.Sleep is called to make sure the mouseMove() event is processed completely before moving to execute the mousePress() method. > > JBS issue: [JDK-8317287](https://bugs.openjdk.org/browse/JDK-8317287) null has updated the pull request incrementally with one additional commit since the last revision: Update InterJVMGetDropSuccessTest.java Based on description in Chapter "17.4 Memory Model", and specifically chapter "17.4.5 Happens-before Order" of the "The Java? Language Specification", DragSourceDropListener.finished field is accessed from two threads without proper synchronization which may also be possible causing the test to fail. Hence, putting code accessing to DragSourceDropListener.finished into a proper synchronization code block. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16396/files - new: https://git.openjdk.org/jdk/pull/16396/files/7598f7e2..a96950a5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16396&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16396&range=00-01 Stats: 26 lines in 1 file changed: 13 ins; 13 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16396.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16396/head:pull/16396 PR: https://git.openjdk.org/jdk/pull/16396 From prr at openjdk.org Tue Oct 31 16:12:36 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 31 Oct 2023 16:12:36 GMT Subject: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape XlbWrapper.c to early return [v2] In-Reply-To: References: Message-ID: On Tue, 31 Oct 2023 08:06:25 GMT, Matthias Baesken wrote: >> src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c line 2303: >> >>> 2301: if (!pRect) { >>> 2302: (*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT); >>> 2303: JNU_ThrowOutOfMemoryError(env, "malloc failed"); >> >> I think the throw is unnecessary. You will get some incorrect rendering, but that's all. > > So should I remove the JNU_ThrowOutOfMemoryError ? The calloc in the same file has a JNU_ThrowOutOfMemoryError (but maybe the situation is different there?) . Fair question. That other case is used only during initialisation and if they fail then some things are not set up properly. So different enough. Yes, I think you can remove the one you are adding. If it ever happens it could be recoverable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16392#discussion_r1377841716 From duke at openjdk.org Tue Oct 31 18:23:41 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 31 Oct 2023 18:23:41 GMT Subject: Integrated: 8169475 : WheelModifier.java fails by timeout In-Reply-To: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> References: <6KNn6fI_9xTfU4881lMLCayoiHPWZAFdZMThs5vti3Q=.fa4bf75b-25c1-436e-b5d0-3984147b025b@github.com> Message-ID: On Fri, 20 Oct 2023 06:59:17 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. > Please review and let me know your suggestions, if any. This pull request has now been integrated. Changeset: 613d32c2 Author: Renjith Kannath Pariyangad Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/613d32c2822a443fdcb131a7d67c528410e9f7e6 Stats: 60 lines in 1 file changed: 41 ins; 9 del; 10 mod 8169475: WheelModifier.java fails by timeout Reviewed-by: dmarkov, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/16281 From duke at openjdk.org Tue Oct 31 18:23:51 2023 From: duke at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 31 Oct 2023 18:23:51 GMT Subject: Integrated: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library In-Reply-To: References: Message-ID: On Mon, 17 Jul 2023 05:52:30 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > Observations : > 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). > 2. For Play back device always loading proper device GUID irrespective of com Initialization. > > Test: > Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. > To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. > > Please review the changes and let me know your comments if any. > > Regards, > Renjith. This pull request has now been integrated. Changeset: 613a3cc6 Author: Renjith Kannath Pariyangad Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/613a3cc6896ef3c3f836d44de9b2fb05beba6e72 Stats: 167 lines in 2 files changed: 166 ins; 0 del; 1 mod 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/14898 From honkar at openjdk.org Tue Oct 31 19:04:45 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 31 Oct 2023 19:04:45 GMT Subject: Integrated: JDK-8313643: Update HarfBuzz to 8.2.2 In-Reply-To: References: Message-ID: On Mon, 23 Oct 2023 19:18:56 GMT, Harshitha Onkar wrote: > Harfbuzz upgraded from 7.2.0 to 8.2.2 > > - 3 new files added - hb-subset-instancer-solver.cc, hb-subset-instancer-solver.hh, hb-subset-plan-member-list.hh > - 2 files deleted - hb-subset-cff1.hh, hb-subset-cff2.hh > - 173 files modified. This pull request has now been integrated. Changeset: 2182c936 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/2182c93689f35c809f4d79a8002c838f8c4f56f3 Stats: 12812 lines in 179 files changed: 7127 ins; 1316 del; 4369 mod 8313643: Update HarfBuzz to 8.2.2 Reviewed-by: jdv, prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/16322