From serb at openjdk.java.net Tue Feb 1 02:47:04 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 02:47:04 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: References: Message-ID: On Mon, 31 Jan 2022 19:44:51 GMT, Harshitha Onkar wrote: >> A new test case was added to test the fix as there was no corresponding test case present for this issue previously. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > tagged test case as mac only src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java line 108: > 106: final int newHeight = height; > 107: > 108: painter.paint(g, c, newX - 1, newY - 1, newWidth + 1, newHeight + 1); I would like to clarify the change here, what is the coordinates/size passed here is it a size of the component+border, or just a size of the component? So if decrease the newX/Y will we draw in the component area, or accidentally draw outside? ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From serb at openjdk.java.net Tue Feb 1 03:14:07 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 03:14:07 GMT Subject: RFR: 8139173: [macosx] JInternalFrame shadow is not properly drawn [v2] In-Reply-To: References: Message-ID: On Thu, 27 Jan 2022 04:30:14 GMT, Toshio Nakamura wrote: >> JInternalFrame's bottom area is not properly drawn with Aqua LAF. >> This problem remained for long time, but we recognized it recently. >> >> According to the bug report, it depends on MacOS's version. I don't have old ones (10.10 and 10.11 in the report), but the current MacOS can recreate the issue. I confirmed the following OS versions recreated this issue and this patch could solve it. >> >> Mojave 10.14.6 >> Catalina 10.15.7 >> Big Sur 11.6.2 >> Monterey 12.1 >> >> jtreg "javax/swing" and "java/awt" have no regression. > > Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: > > Applied review comments Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7228 From serb at openjdk.java.net Tue Feb 1 03:15:11 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 03:15:11 GMT Subject: RFR: 8279586: [macos] custom JCheckBox and JRadioBox with custom icon set: focus is still displayed after unchecking In-Reply-To: References: Message-ID: On Mon, 31 Jan 2022 09:44:43 GMT, Alexander Zuev wrote: > Make border painting for the check boxes and radio buttons with custom icons > take into account the property that enables or disables the focus painting. > Add that case to the test. Looks fine, BTW we can improve this test by checking all installed L&Fs. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7286 From serb at openjdk.java.net Tue Feb 1 03:19:06 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 03:19:06 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails In-Reply-To: References: Message-ID: <1MvCvDPreaTBARpvNkjj1S1z5BWObbsVzBTekpb_c9o=.90e50c8a-5dee-4962-ae23-dbed9d94767c@github.com> On Fri, 28 Jan 2022 21:03:48 GMT, lawrence.andrews wrote: > 1) Removed =yesno that was causing the test to fail with following exception > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > After removing =yesno, test was just passing without user interaction so fixed the following > > Add the following so that user can user interact with the test > a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. > b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. > > @shurymury I am not sure we can pass this test on macOS, do we actually support LCD/color AA on mac? ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From psadhukhan at openjdk.java.net Tue Feb 1 04:23:07 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 1 Feb 2022 04:23:07 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: <_k4TH60mmpl6bPtTLEqzWcI0Ejk-OpuxCHfW_OE8dxA=.8f88460c-d79b-417a-b20b-12ee78ec6427@github.com> References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> <_k4TH60mmpl6bPtTLEqzWcI0Ejk-OpuxCHfW_OE8dxA=.8f88460c-d79b-417a-b20b-12ee78ec6427@github.com> Message-ID: On Mon, 31 Jan 2022 07:24:08 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk I have changed the test case to explicitly set the table and header background to white. Mach5 tests are passing on all platforms including linux now. Can you please let me know in case you are seeing any issues on Ubuntu locally, with the new test case? > > I now see it fail locally in windows system also along with ubuntu. windows screenshot here where the border is white which is why it fails > ![JTheaderBorder](https://user-images.githubusercontent.com/43534309/151753660-92d6021a-30d6-4215-97b0-7ab17ddb88d4.png) It seems there's a anomaly for JTableHeader border in native and jdk in Windows L&F.. The system table shows here doesn't show any line ![JTheaderBorder-win](https://user-images.githubusercontent.com/43534309/151911992-846f2f21-c939-482f-9ef5-746d07c0b410.png) whereas in our SwingSet2 we have a light grey line ![image](https://user-images.githubusercontent.com/43534309/151912084-c9cd39a5-74de-4ef9-a925-6081e8c4d294.png) Technically, it might be construed as a bug but I guess I will prefer a demarcation line between header and body. It's upto you if you want to take a look at this in a separate issue or in this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From tnakamura at openjdk.java.net Tue Feb 1 04:44:11 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Tue, 1 Feb 2022 04:44:11 GMT Subject: RFR: 8139173: [macosx] JInternalFrame shadow is not properly drawn [v2] In-Reply-To: References: Message-ID: <7CnyC1KmHQf4SI1ZWuYz3ZU2mEDoF4KJ4bvuu4arFTA=.6ab42393-ca64-4e1d-949f-eba42ff6eed7@github.com> On Thu, 27 Jan 2022 00:36:54 GMT, Phil Race wrote: >> Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: >> >> Applied review comments > > Looks so much better. @prrace @mrserb Thank you for the review. Could you sponsor this patch? ------------- PR: https://git.openjdk.java.net/jdk/pull/7228 From mvs at openjdk.java.net Tue Feb 1 06:47:30 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 1 Feb 2022 06:47:30 GMT Subject: RFR: 8280948: [TESTBUG] Colocate tonga test bug4659800.java to a regression test Message-ID: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Colocate the tonga based test Swing_JButton/Automated/bug4659800/bug4659800.java to a regression based automated test. This test checks whether typing key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). ------------- Commit messages: - 8280948: [TESTBUG] Colocate tonga test bug4659800.java to a regression test Changes: https://git.openjdk.java.net/jdk/pull/7296/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8280948 Stats: 147 lines in 1 file changed: 147 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Tue Feb 1 07:05:08 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 1 Feb 2022 07:05:08 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method @savoptik Can you please review it. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Tue Feb 1 07:09:06 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 1 Feb 2022 07:09:06 GMT Subject: RFR: 8280948: [TESTBUG] Colocate tonga test bug4659800.java to a regression test In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Colocate the tonga based test Swing_JButton/Automated/bug4659800/bug4659800.java to a regression based automated test. > This test checks whether typing key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). @pankaj-bansal Can you please review it. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From Mitsuru.Kariya at oss.nttdata.com Tue Feb 1 07:31:11 2022 From: Mitsuru.Kariya at oss.nttdata.com (Mitsuru Kariya) Date: Tue, 1 Feb 2022 16:31:11 +0900 Subject: May I close JDK-8067629 and JDK-8252901? Message-ID: Hi, Both JDK-8067629 and JDK-8252901 claim that it's a bug that a bean property of type Boolean cannot have a getter prefix "is". JDK-8067629: PropertyDescriptor.getReadMethod() returns null for Boolean property JDK-8252901: Introspector.getBeanInfo ignore properties of boxed Boolean type I found that the same claim was previously made in JDK-6562471 as Enhancement, but was closed with Won't Fix as it requires a modification of the JavaBeans specification to make that fix. JDK-6562471: RFE: readMethod for Boolean is getXXX whilst for primitive boolean it's isXXX So I think JDK-8067629 and JDK-8252901 can be closed with Won't Fix, how about it? Regards, Mitsuru From myano at openjdk.java.net Tue Feb 1 08:04:11 2022 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 1 Feb 2022 08:04:11 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: Message-ID: On Thu, 28 Oct 2021 08:27:44 GMT, Masanori Yano wrote: >> Could you please review the 8275715 bug fixes? >> >> I think D3DScreenUpdateManager posts unnecessary PaintEvent during processing PaintEvent. When the validate method is called from createGraphics, repaintPeerTarget should not be called. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8275715: D3D pipeline processes multiple PaintEvent at initial drawing @mrserb @prrace Could you tell me what I need to do to merge this PR fix? ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From serb at openjdk.java.net Tue Feb 1 08:15:53 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 08:15:53 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS [v2] In-Reply-To: References: Message-ID: > In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. > > It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. > > Solution is to allocate the storage of the proper size 1 * scale * 1 * scale Sergey Bylokhov 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 three additional commits since the last revision: - the new check - Merge branch 'master' into JDK-8274939 - Initial fix JDK-8274939 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/5864/files - new: https://git.openjdk.java.net/jdk/pull/5864/files/f06c280a..9db451f1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5864&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5864&range=00-01 Stats: 1029674 lines in 4538 files changed: 553493 ins; 449639 del; 26542 mod Patch: https://git.openjdk.java.net/jdk/pull/5864.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5864/head:pull/5864 PR: https://git.openjdk.java.net/jdk/pull/5864 From azvegint at openjdk.java.net Tue Feb 1 09:25:14 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 1 Feb 2022 09:25:14 GMT Subject: RFR: 8279586: [macos] custom JCheckBox and JRadioBox with custom icon set: focus is still displayed after unchecking In-Reply-To: References: Message-ID: <3kvPY5fNBhrQq3iE6HGHKt-TWBbeN-SUj6cepePIV9s=.b9c5afb3-76ae-4270-afc6-095be71288d7@github.com> On Mon, 31 Jan 2022 09:44:43 GMT, Alexander Zuev wrote: > Make border painting for the check boxes and radio buttons with custom icons > take into account the property that enables or disables the focus painting. > Add that case to the test. Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7286 From psadhukhan at openjdk.java.net Tue Feb 1 09:40:10 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 1 Feb 2022 09:40:10 GMT Subject: RFR: 8278254: Cleanup doclint warnings in java.desktop module [v7] In-Reply-To: References: Message-ID: <_awiHsHuZRphG5RJNGzfj_o1LeWHjXtuppzT0jlMcw4=.09005b0a-af8a-415c-9ca2-192ed89492d8@github.com> > The changes done under JDK-8278175 suppress on a per-file basis various missing comments that would otherwise trigger doclint warnings. Fixed them so as to remove the doclint:missing warnings. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Implement CSR suggestion ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7004/files - new: https://git.openjdk.java.net/jdk/pull/7004/files/aebc9d70..17bb943e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7004&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7004&range=05-06 Stats: 18 lines in 1 file changed: 0 ins; 12 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/7004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7004/head:pull/7004 PR: https://git.openjdk.java.net/jdk/pull/7004 From kizune at openjdk.java.net Tue Feb 1 10:25:11 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 1 Feb 2022 10:25:11 GMT Subject: RFR: 8279586: [macos] custom JCheckBox and JRadioBox with custom icon set: focus is still displayed after unchecking In-Reply-To: References: Message-ID: <9p0eMpsKEnvh1HaL6wz_mbJ4ZWYva0tyHUEKf1q_P6Y=.3db68d67-d86d-493f-bdad-bc8e017533a9@github.com> On Tue, 1 Feb 2022 03:11:38 GMT, Sergey Bylokhov wrote: > Looks fine, BTW we can improve this test by checking all installed L&Fs. Not this time. I created separate bug JDK-8281033 and will improve that test in nearest future, right now i'm trying to fix the accessibility issue to remove it from radar. ------------- PR: https://git.openjdk.java.net/jdk/pull/7286 From kizune at openjdk.java.net Tue Feb 1 10:25:11 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 1 Feb 2022 10:25:11 GMT Subject: Integrated: 8279586: [macos] custom JCheckBox and JRadioBox with custom icon set: focus is still displayed after unchecking In-Reply-To: References: Message-ID: On Mon, 31 Jan 2022 09:44:43 GMT, Alexander Zuev wrote: > Make border painting for the check boxes and radio buttons with custom icons > take into account the property that enables or disables the focus painting. > Add that case to the test. This pull request has now been integrated. Changeset: 18a7dc8c Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/18a7dc8c08fa15a260b4a39b18c068d30ee45962 Stats: 19 lines in 2 files changed: 15 ins; 0 del; 4 mod 8279586: [macos] custom JCheckBox and JRadioBox with custom icon set: focus is still displayed after unchecking Reviewed-by: serb, azvegint ------------- PR: https://git.openjdk.java.net/jdk/pull/7286 From aivanov at openjdk.java.net Tue Feb 1 10:35:24 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 1 Feb 2022 10:35:24 GMT Subject: RFR: 8278254: Cleanup doclint warnings in java.desktop module [v7] In-Reply-To: <_awiHsHuZRphG5RJNGzfj_o1LeWHjXtuppzT0jlMcw4=.09005b0a-af8a-415c-9ca2-192ed89492d8@github.com> References: <_awiHsHuZRphG5RJNGzfj_o1LeWHjXtuppzT0jlMcw4=.09005b0a-af8a-415c-9ca2-192ed89492d8@github.com> Message-ID: On Tue, 1 Feb 2022 09:40:10 GMT, Prasanta Sadhukhan wrote: >> The changes done under JDK-8278175 suppress on a per-file basis various missing comments that would otherwise trigger doclint warnings. Fixed them so as to remove the doclint:missing warnings. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Implement CSR suggestion Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7004 From cushon at openjdk.java.net Tue Feb 1 16:58:15 2022 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Tue, 1 Feb 2022 16:58:15 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v10] In-Reply-To: References: Message-ID: <8bgd8AjF-ev0GEN5E0CUBZIU61-bFTqqyn26dsTrFBU=.d6a81200-5160-46b0-ae4c-e28a67649a9d@github.com> On Wed, 12 Jan 2022 18:14:45 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: > > - Merge master > - Write serialized objects at test-time in BadSerializationTest > - Merge branch 'master' into JDK-8277817 > - Revert WIP > - Add a few more missing calls to LookAndFeel.uninstallColors > - Use LookAndFeel.uninstallColorsAndFont in BasicListUI > - Add @since 19 to new methods > - Add uninstallColorsAndFont > - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy Hi, is there any feedback on this change, or the alternate fix in #7100 that updates the binary files, or the related cleanup in #7099? ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Tue Feb 1 17:57:17 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 17:57:17 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS [v2] In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 08:15:53 GMT, Sergey Bylokhov wrote: >> In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. >> >> It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. >> >> Solution is to allocate the storage of the proper size 1 * scale * 1 * scale > > Sergey Bylokhov 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 three additional commits since the last revision: > > - the new check > - Merge branch 'master' into JDK-8274939 > - Initial fix JDK-8274939 I have added an additional check for the parameters of the native method. ------------- PR: https://git.openjdk.java.net/jdk/pull/5864 From dbatrak at openjdk.java.net Tue Feb 1 18:44:38 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Tue, 1 Feb 2022 18:44:38 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components Message-ID: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be 'created' fonts anymore, to preserve their `Font2D` handle. It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and deserialization. ------------- Commit messages: - fix Changes: https://git.openjdk.java.net/jdk/pull/7313/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7313&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8185261 Stats: 167 lines in 5 files changed: 135 ins; 4 del; 28 mod Patch: https://git.openjdk.java.net/jdk/pull/7313.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7313/head:pull/7313 PR: https://git.openjdk.java.net/jdk/pull/7313 From asemenov at openjdk.java.net Tue Feb 1 19:07:11 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Tue, 1 Feb 2022 19:07:11 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 07:01:54 GMT, Manukumar V S wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> 8280913: Create a regression test for JRootPane.setDefaultButton() method > > @savoptik Can you please review it. @manukumarvs Sorry but I?m not the right person to review this change. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From serb at openjdk.java.net Tue Feb 1 19:54:12 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 19:54:12 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components In-Reply-To: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> Message-ID: <-omoOOqSjDkkgkDzDqwVRHDE2tYKjyvP_uTGGmkSbDI=.53c11695-3467-4ae0-b664-cb3d21cf78fd@github.com> On Tue, 1 Feb 2022 18:38:39 GMT, Dmitry Batrak wrote: > The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that > font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field > to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be > 'created' fonts anymore, to preserve their `Font2D` handle. > It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created > font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and > deserialization. src/java.desktop/share/classes/java/awt/Font.java line 464: > 462: * should be copied to derived fonts. > 463: */ > 464: private transient boolean withFallback; I wonder how it will work if the Font was read from the system, then serialized/deserialized and then used? test/jdk/javax/swing/JEditorPane/JEditorPaneFontFallback.java line 2: > 1: /* > 2: * Copyright 2022 JetBrains s.r.o. It seems that different files use different style of "Copyright 2022 JetBrains s.r.o", is the current correct? test/jdk/javax/swing/JEditorPane/JEditorPaneFontFallback.java line 28: > 26: * @bug 8185261 > 27: * @summary Tests that font fallback works reliably in JEditorPane > 28: * @key headful Is the test depends on the headful libraries? Don't we need to test both headful and headless cases? ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From serb at openjdk.java.net Tue Feb 1 21:13:07 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 21:13:07 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v10] In-Reply-To: References: Message-ID: On Wed, 12 Jan 2022 18:14:45 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: > > - Merge master > - Write serialized objects at test-time in BadSerializationTest > - Merge branch 'master' into JDK-8277817 > - Revert WIP > - Add a few more missing calls to LookAndFeel.uninstallColors > - Use LookAndFeel.uninstallColorsAndFont in BasicListUI > - Add @since 19 to new methods > - Add uninstallColorsAndFont > - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy I guess the discussion above suggests extracting the "big" change to the Swing package you did to the separate fix, I missed in what PR that change was moved? ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Tue Feb 1 21:19:08 2022 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Tue, 1 Feb 2022 21:19:08 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v10] In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 21:09:55 GMT, Sergey Bylokhov wrote: > I guess the discussion above suggests extracting the "big" change to the Swing package you did to the separate fix, I missed in what PR that change was moved? The larger fix is tracked by [JDK-8278620: properties installed by javax.swing.LookAndFeel installColors and installColorsAndFont are not uninstalled](https://bugs.openjdk.java.net/browse/JDK-8278620) The feedback in https://github.com/openjdk/jdk/pull/6603#issuecomment-992725319 was that fix should happen as a separate issue and after adding additional test coverage for this code. That makes sense, but it isn't something I have time to work on In the short term, I think it makes sense to consider a more limited fix for the issues revealed by the existing test, but if you'd prefer to wait for JDK-8278620 that's also fine ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From dbatrak at openjdk.java.net Tue Feb 1 21:26:05 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Tue, 1 Feb 2022 21:26:05 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components In-Reply-To: <-omoOOqSjDkkgkDzDqwVRHDE2tYKjyvP_uTGGmkSbDI=.53c11695-3467-4ae0-b664-cb3d21cf78fd@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <-omoOOqSjDkkgkDzDqwVRHDE2tYKjyvP_uTGGmkSbDI=.53c11695-3467-4ae0-b664-cb3d21cf78fd@github.com> Message-ID: On Tue, 1 Feb 2022 19:47:59 GMT, Sergey Bylokhov wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > test/jdk/javax/swing/JEditorPane/JEditorPaneFontFallback.java line 2: > >> 1: /* >> 2: * Copyright 2022 JetBrains s.r.o. > > It seems that different files use different style of "Copyright 2022 JetBrains s.r.o", is the current correct? To my knowledge, it's correct. It's also used in other JetBrains source code currently. > test/jdk/javax/swing/JEditorPane/JEditorPaneFontFallback.java line 28: > >> 26: * @bug 8185261 >> 27: * @summary Tests that font fallback works reliably in JEditorPane >> 28: * @key headful > > Is the test depends on the headful libraries? Don't we need to test both headful and headless cases? Indeed, the test will work just as fine in a headless environment. Copied that line without fixing. Will remove it. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From dbatrak at openjdk.java.net Tue Feb 1 21:36:10 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Tue, 1 Feb 2022 21:36:10 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components In-Reply-To: <-omoOOqSjDkkgkDzDqwVRHDE2tYKjyvP_uTGGmkSbDI=.53c11695-3467-4ae0-b664-cb3d21cf78fd@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <-omoOOqSjDkkgkDzDqwVRHDE2tYKjyvP_uTGGmkSbDI=.53c11695-3467-4ae0-b664-cb3d21cf78fd@github.com> Message-ID: <4X1G8o7BETuYUoRAsnbORaDyX641GuW17UKzzvRzGbE=.2dcb2540-118f-4c90-b7c8-c00b64e83ef7@github.com> On Tue, 1 Feb 2022 19:50:47 GMT, Sergey Bylokhov wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > src/java.desktop/share/classes/java/awt/Font.java line 464: > >> 462: * should be copied to derived fonts. >> 463: */ >> 464: private transient boolean withFallback; > > I wonder how it will work if the Font was read from the system, then serialized/deserialized and then used? Not sure I fully understand the question. `Font` object cannot have both `createdFont` and `withFallback` fields set, at least in the current implementation. If we're talking about 'created' fonts (created from a file), the fix doesn't change anything with regard to their behavior - after serialization/deserialization the font might not work, I guess, if it's not registered using `GraphicsEnvironment.registerFont`. In any case, it will lose it's 'created' status, and will change behavior correspondingly. If we're talking about 'fonts with fallback' (like the ones `JEditorPane` creates under the hood), they will lose their fallback components after serialization/deserialization. But that's also how it worked before the proposed change. I'm not going to address that problem in this PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From dbatrak at openjdk.java.net Tue Feb 1 21:40:53 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Tue, 1 Feb 2022 21:40:53 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> Message-ID: <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> > The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that > font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field > to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be > 'created' fonts anymore, to preserve their `Font2D` handle. > It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created > font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and > deserialization. Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision: remove 'headful' requirement from test case ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7313/files - new: https://git.openjdk.java.net/jdk/pull/7313/files/357ffd0c..e3fa744a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7313&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7313&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7313.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7313/head:pull/7313 PR: https://git.openjdk.java.net/jdk/pull/7313 From serb at openjdk.java.net Tue Feb 1 23:14:08 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 1 Feb 2022 23:14:08 GMT Subject: RFR: 8279878: java/awt/font/JNICheck/JNICheck.sh test fails on Ubuntu 21.10 In-Reply-To: References: Message-ID: On Fri, 14 Jan 2022 19:09:53 GMT, Phil Race wrote: > Some more signal handler related warning strings from the VM need to be excluded from what this test considers a failure > > See the bug for more info. So can we file a bug against someone? We should do something about it. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7091 From duke at openjdk.java.net Wed Feb 2 02:17:06 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 2 Feb 2022 02:17:06 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> <_k4TH60mmpl6bPtTLEqzWcI0Ejk-OpuxCHfW_OE8dxA=.8f88460c-d79b-417a-b20b-12ee78ec6427@github.com> Message-ID: On Tue, 1 Feb 2022 04:19:55 GMT, Prasanta Sadhukhan wrote: >> I now see it fail locally in windows system also along with ubuntu. windows screenshot here where the border is white which is why it fails >> ![JTheaderBorder](https://user-images.githubusercontent.com/43534309/151753660-92d6021a-30d6-4215-97b0-7ab17ddb88d4.png) > > It seems there's a anomaly for JTableHeader border in native and jdk in Windows L&F.. > The system table shows here doesn't show any line > ![JTheaderBorder-win](https://user-images.githubusercontent.com/43534309/151911992-846f2f21-c939-482f-9ef5-746d07c0b410.png) > > whereas in our SwingSet2 we have a light grey line > ![image](https://user-images.githubusercontent.com/43534309/151912084-c9cd39a5-74de-4ef9-a925-6081e8c4d294.png) > > Technically, it might be construed as a bug but I guess I will prefer a demarcation line between header and body. > It's upto you if you want to take a look at this in a separate issue or in this. @prsadhuk Thank you for looking into it. I think this fix will require a change in Window related L&F classes. I think it would help me if I track this as separate issue. ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From mvs at openjdk.java.net Wed Feb 2 03:26:11 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 2 Feb 2022 03:26:11 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method @mrserb Can you please review this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From asemenov at openjdk.java.net Wed Feb 2 09:54:23 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 2 Feb 2022 09:54:23 GMT Subject: RFR: 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y Message-ID: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> There are several source files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y that have the GPL header, need to check if they should be changed to GPL+CP. ------------- Commit messages: - 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y Changes: https://git.openjdk.java.net/jdk/pull/7318/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7318&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8280956 Stats: 78 lines in 26 files changed: 52 ins; 0 del; 26 mod Patch: https://git.openjdk.java.net/jdk/pull/7318.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7318/head:pull/7318 PR: https://git.openjdk.java.net/jdk/pull/7318 From asemenov at openjdk.java.net Wed Feb 2 09:54:23 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 2 Feb 2022 09:54:23 GMT Subject: RFR: 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y In-Reply-To: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> References: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> Message-ID: On Wed, 2 Feb 2022 09:46:14 GMT, Artem Semenov wrote: > There are several source files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y that have the GPL header, need to check if they should be changed to GPL+CP. @forantar @azuev-java please review. ------------- PR: https://git.openjdk.java.net/jdk/pull/7318 From psadhukhan at openjdk.java.net Wed Feb 2 10:08:15 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 2 Feb 2022 10:08:15 GMT Subject: Integrated: 8278254: Cleanup doclint warnings in java.desktop module In-Reply-To: References: Message-ID: <-oL3VoOKtWTNHdU4B7Z2frweJ_cpb48qSLShF2pmyc0=.3972dd57-8f5c-4c8b-8f27-83d333c6cbfc@github.com> On Mon, 10 Jan 2022 05:25:51 GMT, Prasanta Sadhukhan wrote: > The changes done under JDK-8278175 suppress on a per-file basis various missing comments that would otherwise trigger doclint warnings. Fixed them so as to remove the doclint:missing warnings. This pull request has now been integrated. Changeset: ae2504b4 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/ae2504b4692a5298b5835727b04a44e1edc8a4d6 Stats: 275 lines in 19 files changed: 193 ins; 24 del; 58 mod 8278254: Cleanup doclint warnings in java.desktop module Reviewed-by: aivanov, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7004 From aivanov at openjdk.java.net Wed Feb 2 13:47:18 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 2 Feb 2022 13:47:18 GMT Subject: RFR: 8280820: Clean up bug8033699 and bug8075609.java tests: regtesthelpers aren't used Message-ID: Removed references to `regtesthelpers` libarary which isn't used. Organised imports and replaced anonymous classes with lambda expressions. Put `waitForIdle` before the test execution starts and moved the frame to the centre of the screen. The CI with the updated tests is green. ------------- Commit messages: - Put the frame in the centre of the screen - waitForIdle after creating the GUI - Typo: non-grouped - Use lambda expressions or method references instead of anonymous classes - No need to pass robot to hitKey - Use primitive boolean for ActionListener - Access mainFrame from EDT only - Removed regtesthelpers, organised imports, Java-style arrays in main Changes: https://git.openjdk.java.net/jdk/pull/7322/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7322&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8280820 Stats: 75 lines in 2 files changed: 14 ins; 13 del; 48 mod Patch: https://git.openjdk.java.net/jdk/pull/7322.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7322/head:pull/7322 PR: https://git.openjdk.java.net/jdk/pull/7322 From aivanov at openjdk.java.net Wed Feb 2 13:47:18 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 2 Feb 2022 13:47:18 GMT Subject: RFR: 8280820: Clean up bug8033699 and bug8075609.java tests: regtesthelpers aren't used In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:38:36 GMT, Alexey Ivanov wrote: > Removed references to `regtesthelpers` libarary which isn't used. > Organised imports and replaced anonymous classes with lambda expressions. > > Put `waitForIdle` before the test execution starts and moved the frame to the centre of the screen. > > The CI with the updated tests is green. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 29: > 27: * @bug 8033699 8154043 8167160 8208640 8226892 > 28: * @summary Incorrect radio button behavior when pressing tab key > 29: * @run main bug8033699 I thought about moving this block to the start of the class. When viewing the code in IDE, you'll see the test description right away if this block is located before the class declaration. When the test description is above imports, it gets collapsed along with the copyright header. ------------- PR: https://git.openjdk.java.net/jdk/pull/7322 From aivanov at openjdk.java.net Wed Feb 2 16:22:06 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 2 Feb 2022 16:22:06 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 25: > 23: > 24: import javax.swing.*; > 25: import java.awt.*; Could you please expand the wildcard imports? For JDK, `java.*` packages are usually above `javax.*`. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 40: > 38: */ > 39: public class DefaultButtonTest { > 40: static JFrame frame = new JFrame(); `JFrame` is part of Swing and must not be created or accessed from any thread but EDT. I suggest creating the frame in `createUI` method along with other UI components. In this case, you need to dispose of the frame for each LaF. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 105: > 103: System.err.print("Error creating robot"); > 104: e.printStackTrace(); > 105: System.exit(1); You must never call `System.exit` from a jtreg test: just throw the exception. So in this case, you don't need try-catch here, just let `AWTException` propagate to main. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 120: > 118: } catch (Exception e) { > 119: e.printStackTrace(); > 120: } Redundant, propagate the exception. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 127: > 125: robot.waitForIdle(); > 126: > 127: if (buttonPressed) { You can negate the condition and throw `RuntimeException` to fail the test. And `testFailed` variable can be dropped. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From kizune at openjdk.java.net Wed Feb 2 18:01:06 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 2 Feb 2022 18:01:06 GMT Subject: RFR: 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y In-Reply-To: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> References: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> Message-ID: On Wed, 2 Feb 2022 09:46:14 GMT, Artem Semenov wrote: > There are several source files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y that have the GPL header, need to check if they should be changed to GPL+CP. Looks good to me. ------------- Marked as reviewed by kizune (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7318 From prr at openjdk.java.net Wed Feb 2 18:35:07 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 2 Feb 2022 18:35:07 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: On Tue, 1 Feb 2022 21:40:53 GMT, Dmitry Batrak wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision: > > remove 'headful' requirement from test case src/java.desktop/share/classes/java/awt/Font.java line 1861: > 1859: pointSize == font.pointSize && > 1860: withFallback == font.withFallback && > 1861: name.equals(font.name)) { I don't know how much of the fix falls apart if this is changed, but I am not sure about adding this invisible attribute to equals(). I suppose font2DHandle would have the same issue .. but I didn't think that could be used in equals because it is assigned lazily so it would present even more problem. I do see that it would be tricky to have some private extra equality testing in the code that finds the right fall back but I'd still like to see if that approach might work. Can you add in to the bug a more detailed explanation of where exactly you see the problem occur ? I need some convincing and really would like to see if there is an alternative solution that I might prefer but that is something I can't switch on to right now since nothing is coming to me which means it is likely to take some time. I didn't get the JCK comment createdFont is transient .. and nothing serializes the font data. Serialization of Font objects is just serializing the fields liek name and style and size but there's no guarantee that it will behave the same .. I mean if I serialize Segoe UI on WIndows and try to deserialize it on Linux nothing in the world can fix the issue that Linux doesn't have that font. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From duke at openjdk.java.net Wed Feb 2 18:41:17 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 2 Feb 2022 18:41:17 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 02:44:04 GMT, Sergey Bylokhov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> tagged test case as mac only > > src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java line 108: > >> 106: final int newHeight = height; >> 107: >> 108: painter.paint(g, c, newX - 1, newY - 1, newWidth + 1, newHeight + 1); > > I would like to clarify the change here, what is the coordinates/size passed here is it a size of the component+border, or just a size of the component? So if decrease the newX/Y will we draw in the component area, or accidentally draw outside? @mrserb It is the size of component + border. The component being painted here is `DefaultTableCellHeaderRenderer`. Tested under two cases 1. Decreasing x & y, keeping width & height same as above - Border gets drawn inside the component area making header look smaller. 2. Decreasing width & height, keeping x & y same - Border is not visible ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From prr at openjdk.java.net Wed Feb 2 19:00:06 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 2 Feb 2022 19:00:06 GMT Subject: RFR: 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y In-Reply-To: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> References: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> Message-ID: On Wed, 2 Feb 2022 09:46:14 GMT, Artem Semenov wrote: > There are several source files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y that have the GPL header, need to check if they should be changed to GPL+CP. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7318 From serb at openjdk.java.net Wed Feb 2 21:32:28 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 2 Feb 2022 21:32:28 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: On Wed, 2 Feb 2022 18:32:10 GMT, Phil Race wrote: > Serialization of Font objects is just serializing the fields liek name and style and size but there's no guarantee that it will behave the same .. I mean if I serialize Segoe UI on WIndows and try to deserialize it on Linux nothing in the world can fix the issue that Linux doesn't have that font. Since the Font object will lose some fields during serialization its behavior will be changed even on the same platform. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From duke at openjdk.java.net Wed Feb 2 21:53:46 2022 From: duke at openjdk.java.net (DamonGuy) Date: Wed, 2 Feb 2022 21:53:46 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding Message-ID: Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. ------------- Commit messages: - Adjusted pixel buffer variable to also be public to match other final variables. - Updated test to include copyright and moved the jtreg tags to the top. - Changed pixels checked to one from edge of red square to avoid checking antialiased pixels and added buffer for slight offsets due to different resolutions. - Changed pixels checked to one from edge of red square to avoid checking antialiased pixels. - Added jtreg test for HtmlButtonPadding issue - Added logic to handle html clipping to fix AquaButtonUI JButton padding issue Changes: https://git.openjdk.java.net/jdk/pull/7310/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7310&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8015854 Stats: 145 lines in 3 files changed: 143 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7310/head:pull/7310 PR: https://git.openjdk.java.net/jdk/pull/7310 From psadhukhan at openjdk.java.net Wed Feb 2 21:53:48 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 2 Feb 2022 21:53:48 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 16:11:52 GMT, DamonGuy wrote: > Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. > > Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. > > Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. The JBS says "This is reproducible with the Mac default (Aqua) look and feel; using another LAF (Metal for instance) seems to position the ImageView correctly." so it seems to be a mac issue not generic, so fixing in shared code will have other repurcussions..You probably need to fix in Aqua specific class.. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From serb at openjdk.java.net Wed Feb 2 22:43:11 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 2 Feb 2022 22:43:11 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 16:11:52 GMT, DamonGuy wrote: > Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. > > Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. > > Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. I did not check the whole fix, but as an initial thing, I suggest generating the image at runtime and do not commit it to the repo. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From serb at openjdk.java.net Wed Feb 2 23:51:12 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 2 Feb 2022 23:51:12 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 18:38:21 GMT, Harshitha Onkar wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java line 108: >> >>> 106: final int newHeight = height; >>> 107: >>> 108: painter.paint(g, c, newX - 1, newY - 1, newWidth + 1, newHeight + 1); >> >> I would like to clarify the change here, what is the coordinates/size passed here is it a size of the component+border, or just a size of the component? So if decrease the newX/Y will we draw in the component area, or accidentally draw outside? > > @mrserb It is the size of component + border. The component being painted here is `DefaultTableCellHeaderRenderer`. > > Tested under two cases > 1. Decreasing x & y, keeping width & height same as above - Border gets drawn inside the component area making header look smaller. > 2. Decreasing width & height, keeping x & y same - Border is not visible If it is a size of the component+border then how we can draw outside of it by decreasing the x/y? ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From duke at openjdk.java.net Thu Feb 3 01:47:06 2022 From: duke at openjdk.java.net (DamonGuy) Date: Thu, 3 Feb 2022 01:47:06 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 07:44:31 GMT, Prasanta Sadhukhan wrote: > The JBS says "This is reproducible with the Mac default (Aqua) look and feel; using another LAF (Metal for instance) seems to position the ImageView correctly." so it seems to be a mac issue not generic, so fixing in shared code will have other repurcussions..You probably need to fix in Aqua specific class.. @prsadhuk Sorry, I forgot to mention in the JBS issue that while testing if the issue was reproducible locally, I discovered that the issue exists for Aqua LAF as described, but also other LAFs (such as Metal and Basic). This discovery shifted my attention away from AquaButtonUI alone, and AquaButtonUI's layoutAndGetText method using alternative insets turned out to be where the issue was coming from. This method relies on "SwingUtilities.layoutCompoundLabel" to generate alternative insets, so that's where I made my changes. Is this logic valid or should I contain my changes in AquaButtonUI? ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From duke at openjdk.java.net Thu Feb 3 02:15:12 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 3 Feb 2022 02:15:12 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4] In-Reply-To: References: Message-ID: <79zm5dx9EYLQVQigWd3Se_Yc5YhN529RSlcVWglI7sU=.42380804-e49d-4ac3-bee3-ff57e36997ae@github.com> On Wed, 2 Feb 2022 23:48:11 GMT, Sergey Bylokhov wrote: >> @mrserb It is the size of component + border. The component being painted here is `DefaultTableCellHeaderRenderer`. >> >> Tested under two cases >> 1. Decreasing x & y, keeping width & height same as above - Border gets drawn inside the component area making header look smaller. >> 2. Decreasing width & height, keeping x & y same - Border is not visible > > If it is a size of the component+border then how we can draw outside of it by decreasing the x/y? @mrserb Sorry, what I meant to convey is that the coordinate arguments sent to painter.paint() is including the component + border, and newX, newY, newHeight, newWidth are coordinates of component only. So when newX and newY are decreased by more than 1 in paint() method, border seems to be drawn **inside** the component area and not **outside** (in this case within the table header) ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From psadhukhan at openjdk.java.net Thu Feb 3 06:31:13 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 3 Feb 2022 06:31:13 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 01:43:07 GMT, DamonGuy wrote: > > The JBS says "This is reproducible with the Mac default (Aqua) look and feel; using another LAF (Metal for instance) seems to position the ImageView correctly." so it seems to be a mac issue not generic, so fixing in shared code will have other repurcussions..You probably need to fix in Aqua specific class.. > > @prsadhuk Sorry, I forgot to mention in the JBS issue that while testing if the issue was reproducible locally, I discovered that the issue exists for Aqua LAF as described, but also other LAFs (such as Metal and Basic). > Then it would be better to iterate through all installed L&F in the testcase to check this fix. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From psadhukhan at openjdk.java.net Thu Feb 3 07:07:27 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 3 Feb 2022 07:07:27 GMT Subject: RFR: 8166050: partialArray is not created in javax.swing.text.html.parser.NPrintWriter.println(...) method Message-ID: The uninitialized "partialArray" in NPrintWriter.println() can cause NPE in System.arraycopy . But it is seen that NPrintWriter class embedded in TagStack class file cannot be used by application as it is not a public class and not an inner class too and also there's no object of it created in TagStack class to access NPrintWriter and there's no instances of accessing NPrintWriter in jdk. So, it seems prudent to remove instead of fixing this ununsed, unaccessible class . Build and jtreg tests are ok. ------------- Commit messages: - 8166050: partialArray is not created in javax.swing.text.html.parser.NPrintWriter.println(...) method Changes: https://git.openjdk.java.net/jdk/pull/7332/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7332&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8166050 Stats: 40 lines in 1 file changed: 0 ins; 40 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7332.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7332/head:pull/7332 PR: https://git.openjdk.java.net/jdk/pull/7332 From asemenov at openjdk.java.net Thu Feb 3 07:25:12 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Thu, 3 Feb 2022 07:25:12 GMT Subject: Integrated: 8280956 Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y In-Reply-To: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> References: <90fO_T5P0Dp3yIGPWlrR6TfGLt7g75tOnrQAF6bZyXs=.c92a9bee-32fe-4023-8d10-c5b3d6b0e764@github.com> Message-ID: On Wed, 2 Feb 2022 09:46:14 GMT, Artem Semenov wrote: > There are several source files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y that have the GPL header, need to check if they should be changed to GPL+CP. This pull request has now been integrated. Changeset: fe547eac Author: Artem Semenov URL: https://git.openjdk.java.net/jdk/commit/fe547eacd71b4eb8119ecc7ca2d0bbe8e757f854 Stats: 78 lines in 26 files changed: 52 ins; 0 del; 26 mod 8280956: Re-examine copyright headers on files in src/java.desktop/macosx/native/libawt_lwawt/awt/a11y Reviewed-by: kizune, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7318 From akolarkunnu at openjdk.java.net Thu Feb 3 09:47:13 2022 From: akolarkunnu at openjdk.java.net (Abdul Kolarkunnu) Date: Thu, 3 Feb 2022 09:47:13 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 36: > 34: * @bug 8280913 > 35: * @summary Check whether the default button is honoured when key is > 36: * pressed when the focus is on the frame. Some grammatical mistake in summary ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From akolarkunnu at openjdk.java.net Thu Feb 3 09:54:15 2022 From: akolarkunnu at openjdk.java.net (Abdul Kolarkunnu) Date: Thu, 3 Feb 2022 09:54:15 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 43: > 41: static volatile boolean buttonPressed = false; > 42: boolean testFailed = false; > 43: JButton button1; button1, button2, panel & robot are used in single method, do they need to be class variables? ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From akolarkunnu at openjdk.java.net Thu Feb 3 09:57:11 2022 From: akolarkunnu at openjdk.java.net (Abdul Kolarkunnu) Date: Thu, 3 Feb 2022 09:57:11 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: <90tbzA31j0mo4auAbnhcCc_wdxZwXGk5_jI9Fa9TGKU=.eb613cdd-673b-488e-86c0-cffac9a7a391@github.com> On Sun, 30 Jan 2022 06:30:43 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 80: > 78: synchronized (this) { > 79: buttonPressed = true; > 80: notifyAll(); notifying whom? ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From akolarkunnu at openjdk.java.net Thu Feb 3 10:01:12 2022 From: akolarkunnu at openjdk.java.net (Abdul Kolarkunnu) Date: Thu, 3 Feb 2022 10:01:12 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: <10dxiqsW2COihtm4vHcSL6iqMBnwiLHXlu-i5i5E9gk=.49618bee-9572-43e0-9ed3-c5cf3e259e97@github.com> On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Write a regression test for JDK-4659800. > This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). test/jdk/javax/swing/JButton/4659800/bug4659800.java line 23: > 21: * questions. > 22: */ > 23: import javax.swing.*; Please expand wildcard imports ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From dbatrak at openjdk.java.net Thu Feb 3 10:21:12 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 3 Feb 2022 10:21:12 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: On Wed, 2 Feb 2022 21:29:28 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/java/awt/Font.java line 1861: >> >>> 1859: pointSize == font.pointSize && >>> 1860: withFallback == font.withFallback && >>> 1861: name.equals(font.name)) { >> >> I don't know how much of the fix falls apart if this is changed, but I am not sure about adding this invisible attribute to equals(). I suppose font2DHandle would have the same issue .. but I didn't think that could be used in equals because it is assigned lazily so it would present even more problem. >> I do see that it would be tricky to have some private extra equality testing in the code that finds the right fall back but I'd still like to see if that approach might work. Can you add in to the bug a more detailed explanation of where exactly you see the problem occur ? >> >> I need some convincing and really would like to see if there is an alternative solution that I might prefer but that is something I can't switch on to right now since nothing is coming to me which means it is likely to take some time. >> >> I didn't get the JCK comment createdFont is transient .. and nothing serializes the font data. >> Serialization of Font objects is just serializing the fields liek name and style and size but there's no guarantee that it will behave the same .. I mean if I serialize Segoe UI on WIndows and try to deserialize it on Linux nothing in the world can fix the issue that Linux doesn't have that font. > >> Serialization of Font objects is just serializing the fields liek name and style and size but there's no guarantee that it will behave the same .. I mean if I serialize Segoe UI on WIndows and try to deserialize it on Linux nothing in the world can fix the issue that Linux doesn't have that font. > > Since the Font object will lose some fields during serialization its behavior will be changed even on the same platform. I've added some more details to the ticket about why exactly given test case isn't working as expected. Please let me know if I wasn't clear enough. > I don't know how much of the fix falls apart if this is changed, but I am not sure about adding this invisible attribute to equals(). That added line in `equals()` method is actually the main change in the fix. As you say, one could possibly also try to compare `font2DHandle`-s instead, but that would require forcing the population of that field in `equals` method, which seems to have larger potential for side effects. As a font with fallback components can produce different rendering that the font without them, I believe, they shouldn't be considered 'equal'. Of course, there's an alternative method to fix this - make font metrics cache distinguish such fonts explicitly, without modifying `Font.equals()`. But font metrics cache isn't the only place comparing fonts using `equals()` method, and such a solution, I believe, would just mean waiting for other trouble in future. The fact that `equals` would be using some private information isn't perfect of course. Ideally, this information (whether the font supports font fallback or not) should be public, and it should be possible to specify this property when creating a font object, but that needs introducing new API methods, and I don't want to go that far at the moment. Also, we're already living in a non-perfect world, where two `Font` objects with identical public properties might behave differently, and now we're just changing `equals` method to reflect that. As for the comment about JCK, that relates to a yet another implementation option - do not introduce a new field, and just add comparing of `createdFont` fields in `equals` method. That's the way it was originally implemented in JBR 4 years ago, but after we found out it breaks JCK, the fix was changed to use a separate field. Corresponding JCK test, creates a font object from a file on filesystem, using `Font.createFont` method, serializes/deserializes it, and checks that the result is 'equal' to the initially created font. As `createdFont` field is transient, it's reset to `false` after serialization/deserialization, and the test obviously fails, if we try to include `createdFont` check into `equals`. Making `createdFont` field not transient also doesn't seem to be an option, as that is also considered an API change. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From mvs at openjdk.java.net Thu Feb 3 11:20:50 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 11:20:50 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v4] In-Reply-To: References: Message-ID: > This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. > As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". > > This test is run multiple times in different platforms and got 100% success in mac and windows, linux. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: 8280913: Create a regression test for JRootPane.setDefaultButton() method ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7278/files - new: https://git.openjdk.java.net/jdk/pull/7278/files/9ed2cc9b..c652841d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=02-03 Stats: 76 lines in 1 file changed: 13 ins; 34 del; 29 mod Patch: https://git.openjdk.java.net/jdk/pull/7278.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7278/head:pull/7278 PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Thu Feb 3 11:26:13 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 11:26:13 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 16:19:16 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> 8280913: Create a regression test for JRootPane.setDefaultButton() method > > Changes requested by aivanov (Reviewer). @aivanov-jdk I have fixed the review comments, can you please have a look. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Thu Feb 3 14:53:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 14:53:13 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v4] In-Reply-To: References: Message-ID: <3lrBEv5_9wfHjUbnZBUQD4y9AKjXdlWACGAAE7djstk=.8ebcdc6b-db62-4c20-825e-13bb7897971f@github.com> On Thu, 3 Feb 2022 11:20:50 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 39: > 37: * @bug 8280913 > 38: * @summary Check whether the default button is honored when key is > 39: * pressed while the focus is on the frame. ??while the focus is on the frame? is not quite correct. The default button should get pressed when focus is on whatever component that doesn't consume Enter. I suggest dropping this part from the description. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 44: > 42: public class DefaultButtonTest { > 43: volatile boolean buttonPressed = false; > 44: JFrame frame; I'd add `private` to the declaration. Assigning `false` is redundant. It's the default value and you explicitly assign `false` to it in each L&F iteration. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 52: > 50: } finally { > 51: test.disposeFrame(); > 52: } This partly duplicates the code in `runTest`. I'd suggest putting try-finally inside the for-loop in `runTest`. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 78: > 76: JPanel panel = new JPanel(); > 77: panel.setLayout(new FlowLayout()); > 78: JButton button1 = new JButton("button1"); May I suggest adding: panel.add(new JTextField("Text field")); The text field will get the focus on the frame. Pressing Enter should still activate the default button. I think it's a better test compared to explicitly requesting the focus to the root pane because it's more natural. If you do this, you can drop the line: frame.getRootPane().requestFocus(); test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 89: > 87: frame.add(panel); > 88: > 89: frame.setSize(200, 200); Can be replaced with frame.pack(); test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 96: > 94: > 95: public void runTest() throws Exception { > 96: Robot robot = new Robot(); Add `robot.setAutoDelay(100);` then you can drop `robot.delay(100);` between key press and release. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 117: > 115: throw new RuntimeException("Test Failed, button not pressed for L&F: " + lafName); > 116: } > 117: disposeFrame(); The frame must be disposed of on EDT. So either SwingUtilities.invokeAndWait(this::disposeFrame); or wrap the body of `disposeFrame` method into `SwingUtilities.invokeAndWait`. test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 121: > 119: } > 120: > 121: } Please add line break at the end of the file. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Thu Feb 3 14:53:14 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 14:53:14 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v3] In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 09:44:04 GMT, Abdul Kolarkunnu wrote: > Some grammatical mistake in summary @akolarkunnu Could you please clarify where there's a grammatical mistake or suggest a correct summary text? ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Thu Feb 3 15:02:06 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 15:02:06 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v4] In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 11:20:50 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 77: > 75: frame = new JFrame(); > 76: JPanel panel = new JPanel(); > 77: panel.setLayout(new FlowLayout()); `FlowLayout` is the default layout manager for `JPanel`. If you like to set the layout manager explicitly, you can pass it to `JPanel` constructor. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Thu Feb 3 15:27:08 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 15:27:08 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Write a regression test for JDK-4659800. > This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). I must be missing something but [JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800) talks about the Enter key, not the Space key: _Hitting enter on focused JButton no longer causes action_. It looks you're testing a completely different thing. Yes, Space key _always_ activates the focused button. Whether Enter key activates focused button is L&F dependent. The test case in JDK-4659800 changes the L&F to WindowsLookAndFeel therefore Enter key is expected to cause the ActionEvent; if you leave the default MetalLookAndFeel or use NimbusLookAndFeel, pressing the Enter key should not send the ActionEvent. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Thu Feb 3 15:32:06 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 15:32:06 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Thu, 3 Feb 2022 15:24:25 GMT, Alexey Ivanov wrote: > I must be missing something but [JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800) talks about the Enter key, not the Space key: _Hitting enter on focused JButton no longer causes action_. > > It looks you're testing a completely different thing. > > Yes, Space key _always_ activates the focused button. Whether Enter key activates focused button is L&F dependent. The test case in JDK-4659800 changes the L&F to WindowsLookAndFeel therefore Enter key is expected to cause the ActionEvent; if you leave the default MetalLookAndFeel or use NimbusLookAndFeel, pressing the Enter key should not send the ActionEvent. Yea, you are correct, I first tried with key and it was failing with MetalLookAndFeel or use NimbusLookAndFeel, so I thought of changing it to so that it pass in all LnFs, may be I can add that use-case also here, or it would be a separate test case by itself? ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From aivanov at openjdk.java.net Thu Feb 3 15:32:05 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 15:32:05 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: <57kAw1z62ZvGxaEDx40EAmTEFan79DPSpahKjZ2pMJ4=.9466494f-d38c-4c2e-911d-a90b091cfd0f@github.com> On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Write a regression test for JDK-4659800. > This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). Please take into account all the comments in #7278 as well as my comment about Enter vs Space. test/jdk/javax/swing/JButton/4659800/bug4659800.java line 123: > 121: button1.requestFocusInWindow(); > 122: Point p = button1.getLocationOnScreen(); > 123: robot.mouseMove(p.x + button1.getWidth() / 2, p.y + button1.getHeight() / 2); I don't understand why you need to programmatically press the `dummyButton` and then move the mouse cursor to `button1`. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7296 From aivanov at openjdk.java.net Thu Feb 3 15:50:09 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 15:50:09 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Write a regression test for JDK-4659800. > This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). > Yea, you are correct, I first tried with key and it was failing with MetalLookAndFeel or use NimbusLookAndFeel, so I thought of changing it to so that it pass in all LnFs, may be I can add that use-case also here, or it would be a separate test case by itself? But then _it's not a regression test_ for [JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800), it's a new test. I'm not sure it's worth testing that pressing Space key on a button sends `ActionEvent`. I think it should be covered by an existing test, probably in JCK, but I haven't checked one exists. If you like, you can create two separate tests: `SpaceKeyActivatesButton` and `EnterKeyActivatesButton` where the latter is limited to Windows platform and Windows and Windows Classic Look-and-Feel. In recent years, test files are usually given meaningful names rather than `bugNNNN`. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Thu Feb 3 18:55:48 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 18:55:48 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v2] In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: <88Bbqo2TgIvkx-OWOpY2kiiXF7z8g-0pHP_uLS-etq0=.faa48750-1d21-4daa-a624-384c938661da@github.com> > Write a regression test for JDK-4659800. > This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms. > This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30). Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: 8280948: [TESTBUG] Write a regression test for JDK-4659800 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7296/files - new: https://git.openjdk.java.net/jdk/pull/7296/files/603098f6..47d5eeef Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=00-01 Stats: 267 lines in 2 files changed: 120 ins; 147 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Thu Feb 3 19:06:42 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 19:06:42 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v5] In-Reply-To: References: Message-ID: > This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. > As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". > > This test is run multiple times in different platforms and got 100% success in mac and windows, linux. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: 8280913: Create a regression test for JRootPane.setDefaultButton() method ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7278/files - new: https://git.openjdk.java.net/jdk/pull/7278/files/c652841d..2e791ce6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=03-04 Stats: 46 lines in 1 file changed: 5 ins; 15 del; 26 mod Patch: https://git.openjdk.java.net/jdk/pull/7278.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7278/head:pull/7278 PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Thu Feb 3 19:06:51 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 19:06:51 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v4] In-Reply-To: <3lrBEv5_9wfHjUbnZBUQD4y9AKjXdlWACGAAE7djstk=.8ebcdc6b-db62-4c20-825e-13bb7897971f@github.com> References: <3lrBEv5_9wfHjUbnZBUQD4y9AKjXdlWACGAAE7djstk=.8ebcdc6b-db62-4c20-825e-13bb7897971f@github.com> Message-ID: On Thu, 3 Feb 2022 14:27:57 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> 8280913: Create a regression test for JRootPane.setDefaultButton() method > > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 39: > >> 37: * @bug 8280913 >> 38: * @summary Check whether the default button is honored when key is >> 39: * pressed while the focus is on the frame. > > ??while the focus is on the frame? is not quite correct. The default button should get pressed when focus is on whatever component that doesn't consume Enter. I suggest dropping this part from the description. Changed > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 44: > >> 42: public class DefaultButtonTest { >> 43: volatile boolean buttonPressed = false; >> 44: JFrame frame; > > I'd add `private` to the declaration. > > Assigning `false` is redundant. It's the default value and you explicitly assign `false` to it in each L&F iteration. changed > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 52: > >> 50: } finally { >> 51: test.disposeFrame(); >> 52: } > > This partly duplicates the code in `runTest`. > I'd suggest putting try-finally inside the for-loop in `runTest`. Done > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 77: > >> 75: frame = new JFrame(); >> 76: JPanel panel = new JPanel(); >> 77: panel.setLayout(new FlowLayout()); > > `FlowLayout` is the default layout manager for `JPanel`. If you like to set the layout manager explicitly, you can pass it to `JPanel` constructor. Removed it. > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 78: > >> 76: JPanel panel = new JPanel(); >> 77: panel.setLayout(new FlowLayout()); >> 78: JButton button1 = new JButton("button1"); > > May I suggest adding: > > panel.add(new JTextField("Text field")); > > The text field will get the focus on the frame. Pressing Enter should still activate the default button. I think it's a better test compared to explicitly requesting the focus to the root pane because it's more natural. > > If you do this, you can drop the line: > > frame.getRootPane().requestFocus(); Done > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 89: > >> 87: frame.add(panel); >> 88: >> 89: frame.setSize(200, 200); > > Can be replaced with > > frame.pack(); Done > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 96: > >> 94: >> 95: public void runTest() throws Exception { >> 96: Robot robot = new Robot(); > > Add `robot.setAutoDelay(100);` then you can drop `robot.delay(100);` between key press and release. Done > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 117: > >> 115: throw new RuntimeException("Test Failed, button not pressed for L&F: " + lafName); >> 116: } >> 117: disposeFrame(); > > The frame must be disposed of on EDT. So either > > SwingUtilities.invokeAndWait(this::disposeFrame); > > or wrap the body of `disposeFrame` method into `SwingUtilities.invokeAndWait`. Done > test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 121: > >> 119: } >> 120: >> 121: } > > Please add line break at the end of the file. Done ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Thu Feb 3 19:10:49 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 3 Feb 2022 19:10:49 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v3] In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: > Write a regression test for JDK-4659800. > This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. > This test is run 10 times on windows and it passed all the times. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: 8280948: [TESTBUG] Write a regression test for JDK-4659800 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7296/files - new: https://git.openjdk.java.net/jdk/pull/7296/files/47d5eeef..84c726e9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From duke at openjdk.java.net Thu Feb 3 20:13:09 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 3 Feb 2022 20:13:09 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails In-Reply-To: <1MvCvDPreaTBARpvNkjj1S1z5BWObbsVzBTekpb_c9o=.90e50c8a-5dee-4962-ae23-dbed9d94767c@github.com> References: <1MvCvDPreaTBARpvNkjj1S1z5BWObbsVzBTekpb_c9o=.90e50c8a-5dee-4962-ae23-dbed9d94767c@github.com> Message-ID: On Tue, 1 Feb 2022 03:16:28 GMT, Sergey Bylokhov wrote: >> 1) Removed =yesno that was causing the test to fail with following exception >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> After removing =yesno, test was just passing without user interaction so fixed the following >> >> Add the following so that user can user interact with the test >> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. >> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. >> >> @shurymury > > I am not sure we can pass this test on macOS, do we actually support LCD/color AA on mac? @mrserb , I do see a lot of LCD support on mac https://bugs.openjdk.java.net/issues/?jql=component%20in%20(client-libs)%20and%20summary%20~%20%22LCD%20Text%22%20and%20labels%20in%20(lanai) ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From aivanov at openjdk.java.net Thu Feb 3 21:21:07 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 21:21:07 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v5] In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 19:06:42 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280913: Create a regression test for JRootPane.setDefaultButton() method Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 38: > 36: * @key headful > 37: * @bug 8280913 > 38: * @summary Check whether the default button is honored when key is typed. ?pressed? was better. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Thu Feb 3 21:51:05 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 3 Feb 2022 21:51:05 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v3] In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: <_2TeSno9d4FV6uAGWSryFnhEpTU4M4HRF05nBLdpr4U=.f44d9a73-bf17-4757-ae19-0d0a5654e7db@github.com> On Thu, 3 Feb 2022 19:10:49 GMT, Manukumar V S wrote: >> Write a regression test for JDK-4659800. >> This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. >> This test is run 10 times on windows and it passed all the times. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > 8280948: [TESTBUG] Write a regression test for JDK-4659800 Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 74: > 72: frame = new JFrame(); > 73: JPanel panel = new JPanel(); > 74: panel.add(new JTextField("Text field")); It's not necessary here. You're testing JButton itself. test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 90: > 88: Robot robot = new Robot(); > 89: robot.setAutoDelay(100); > 90: for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { I can suggest iterating over the filtered list of lafs: LookAndFeelInfo[] winlafs = Arrays.stream(lafs) .filter(e -> e.getName().startsWith("Windows")) .toArray(LookAndFeelInfo[]::new) Or you can collect the result as list via `.collect(Collectors.toList())`. Alternatively, you can use the `forEach` method with the body of the `for`-loop. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From duke at openjdk.java.net Thu Feb 3 23:35:42 2022 From: duke at openjdk.java.net (DamonGuy) Date: Thu, 3 Feb 2022 23:35:42 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding [v2] In-Reply-To: References: Message-ID: > Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. > > Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. > > Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. DamonGuy has updated the pull request incrementally with two additional commits since the last revision: - Add cycling of all installed LAFs. Add image generation to avoid saving an image to repo. - Changed frame to dispose regardless of passing or failing. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7310/files - new: https://git.openjdk.java.net/jdk/pull/7310/files/beb104b1..9a3c223c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7310&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7310&range=00-01 Stats: 105 lines in 2 files changed: 69 ins; 25 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/7310.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7310/head:pull/7310 PR: https://git.openjdk.java.net/jdk/pull/7310 From duke at openjdk.java.net Fri Feb 4 01:26:36 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 4 Feb 2022 01:26:36 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v5] In-Reply-To: References: Message-ID: > Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. > > Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method. > > A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: changed the test case condition and marked the test as mac-only ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7219/files - new: https://git.openjdk.java.net/jdk/pull/7219/files/516985d5..552d4099 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=03-04 Stats: 46 lines in 1 file changed: 26 ins; 12 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/7219.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7219/head:pull/7219 PR: https://git.openjdk.java.net/jdk/pull/7219 From prr at openjdk.java.net Fri Feb 4 02:40:06 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 4 Feb 2022 02:40:06 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails In-Reply-To: References: Message-ID: On Fri, 28 Jan 2022 21:03:48 GMT, lawrence.andrews wrote: > 1) Removed =yesno that was causing the test to fail with following exception > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > After removing =yesno, test was just passing without user interaction so fixed the following > > Add the following so that user can user interact with the test > a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. > b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. > > @shurymury on macOS we are currently getting ONLY greyscale. No B&W. No LCD. So this test isn't much use on macOS and in general any test that sets a HINT can't be too prescriptive about what it expects back. I'd be inclined to exclude macOS from this test for it to be at all useful. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From duke at openjdk.java.net Fri Feb 4 02:58:08 2022 From: duke at openjdk.java.net (DamonGuy) Date: Fri, 4 Feb 2022 02:58:08 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding [v2] In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 23:35:42 GMT, DamonGuy wrote: >> Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. >> >> Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. >> >> Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. > > DamonGuy has updated the pull request incrementally with two additional commits since the last revision: > > - Add cycling of all installed LAFs. Add image generation to avoid saving an image to repo. > - Changed frame to dispose regardless of passing or failing. I noticed I mistakenly left the thrown exception for failures commented out for the most recent push while testing the new changes. The new test with the run-time generated image and cycled LAFs seems to fail for Nimbus LAF, so I will fix this and push to the branch again. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From duke at openjdk.java.net Fri Feb 4 06:40:12 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 4 Feb 2022 06:40:12 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v5] In-Reply-To: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> Message-ID: On Thu, 27 Jan 2022 09:31:21 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> changed the test case condition and marked the test as mac-only > > test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 106: > >> 104: if(lowerLeft.getRGB() == WHITE_RGB || lowerRight.getRGB() == WHITE_RGB) >> 105: { >> 106: throw new RuntimeException("JTableHeader Bottom Border not visible"); > > Not sure this check is correct. If we have dark theme or the background is changed in system, then I guess the test will fail even with fix. Maybe you can set the JTable background to white explicitly. @prsadhuk The fix and test case is ready for review. I have marked the testcase as mac-only. ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From mvs at openjdk.java.net Fri Feb 4 10:30:52 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 10:30:52 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v4] In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: > Write a regression test for JDK-4659800. > This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. > This test is run 10 times on windows and it passed all the times. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments - Filtered out Windows LnFs,removed JTextField,updated Summary ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7296/files - new: https://git.openjdk.java.net/jdk/pull/7296/files/84c726e9..7de54ad4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=02-03 Stats: 32 lines in 1 file changed: 11 ins; 7 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Fri Feb 4 10:43:56 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 10:43:56 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v6] In-Reply-To: References: Message-ID: <9MMPDckMJ1kOzjz4SRB6Y6xYvn-pAP1ZC_aOrhM2Lt4=.814ce28a-3e4e-4cf2-bb2b-1ce2f67b6e33@github.com> > This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. > As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". > > This test is run multiple times in different platforms and got 100% success in mac and windows, linux. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comment - typed changed to pressed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7278/files - new: https://git.openjdk.java.net/jdk/pull/7278/files/2e791ce6..0983c2c5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7278&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7278.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7278/head:pull/7278 PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Fri Feb 4 10:43:57 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 4 Feb 2022 10:43:57 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v6] In-Reply-To: <9MMPDckMJ1kOzjz4SRB6Y6xYvn-pAP1ZC_aOrhM2Lt4=.814ce28a-3e4e-4cf2-bb2b-1ce2f67b6e33@github.com> References: <9MMPDckMJ1kOzjz4SRB6Y6xYvn-pAP1ZC_aOrhM2Lt4=.814ce28a-3e4e-4cf2-bb2b-1ce2f67b6e33@github.com> Message-ID: On Fri, 4 Feb 2022 10:41:00 GMT, Manukumar V S wrote: >> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. >> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". >> >> This test is run multiple times in different platforms and got 100% success in mac and windows, linux. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comment - typed changed to pressed Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Fri Feb 4 10:43:57 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 10:43:57 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v6] In-Reply-To: References: <9MMPDckMJ1kOzjz4SRB6Y6xYvn-pAP1ZC_aOrhM2Lt4=.814ce28a-3e4e-4cf2-bb2b-1ce2f67b6e33@github.com> Message-ID: On Fri, 4 Feb 2022 10:35:23 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comment - typed changed to pressed > > Marked as reviewed by aivanov (Reviewer). @aivanov-jdk Can you please sponsor my changes?. ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From aivanov at openjdk.java.net Fri Feb 4 10:53:14 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 4 Feb 2022 10:53:14 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v4] In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Fri, 4 Feb 2022 10:30:52 GMT, Manukumar V S wrote: >> Write a regression test for JDK-4659800. >> This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. >> This test is run 10 times on windows and it passed all the times. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments - Filtered out Windows LnFs,removed JTextField,updated Summary test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 92: > 90: Robot robot = new Robot(); > 91: robot.setAutoDelay(100); > 92: //Filter out Windows related LnFs. The comment is misleading: Filter out non-Windows L&Fs. Usually, there's a space after `//`. test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 96: > 94: .filter(laf -> laf.getName().startsWith("Windows")) > 95: .map(laf -> laf.getClassName()) > 96: .collect(Collectors.toList()); Just a note. You can align the chained calls with the first `.stream` one. Here, it nearly fits into 80-column limit and doesn't exceed 100-column limit. I don't know if there are any guidelines in this regard for java.desktop module. It's up to you. IDE recommends replacing `.collect(Collectors.toList()` with `.toList()` ? looks cleaner, doesn't it? It also recommends replacing lambda expression `laf -> laf.getClassName()` with method reference `UIManager.LookAndFeelInfo::getClassName`, yet the former seems to convey the intent clearer. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From aivanov at openjdk.java.net Fri Feb 4 10:55:15 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 4 Feb 2022 10:55:15 GMT Subject: RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v6] In-Reply-To: References: <9MMPDckMJ1kOzjz4SRB6Y6xYvn-pAP1ZC_aOrhM2Lt4=.814ce28a-3e4e-4cf2-bb2b-1ce2f67b6e33@github.com> Message-ID: On Fri, 4 Feb 2022 10:35:23 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comment - typed changed to pressed > > Marked as reviewed by aivanov (Reviewer). > @aivanov-jdk Can you please sponsor my changes?. Sure! ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Fri Feb 4 10:55:16 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 10:55:16 GMT Subject: Integrated: 8280913: Create a regression test for JRootPane.setDefaultButton() method In-Reply-To: References: Message-ID: On Sat, 29 Jan 2022 13:54:28 GMT, Manukumar V S wrote: > This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs. > As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ". > > This test is run multiple times in different platforms and got 100% success in mac and windows, linux. This pull request has now been integrated. Changeset: 51b53a82 Author: Manukumar V S Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/51b53a821bb3cfb962f80a637f5fb8cde988975a Stats: 111 lines in 1 file changed: 111 ins; 0 del; 0 mod 8280913: Create a regression test for JRootPane.setDefaultButton() method Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7278 From mvs at openjdk.java.net Fri Feb 4 11:47:10 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 11:47:10 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v4] In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Fri, 4 Feb 2022 10:45:23 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comments - Filtered out Windows LnFs,removed JTextField,updated Summary > > test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 96: > >> 94: .filter(laf -> laf.getName().startsWith("Windows")) >> 95: .map(laf -> laf.getClassName()) >> 96: .collect(Collectors.toList()); > > Just a note. You can align the chained calls with the first `.stream` one. Here, it nearly fits into 80-column limit and doesn't exceed 100-column limit. I don't know if there are any guidelines in this regard for java.desktop module. It's up to you. > > IDE recommends replacing `.collect(Collectors.toList()` with `.toList()` ? looks cleaner, doesn't it? > > It also recommends replacing lambda expression `laf -> laf.getClassName()` with method reference `UIManager.LookAndFeelInfo::getClassName`, yet the former seems to convey the intent clearer. I don't find such a method .toList(), but toArray() is there, you mean that? ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Fri Feb 4 12:09:58 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 12:09:58 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v5] In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: > Write a regression test for JDK-4659800. > This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. > This test is run 10 times on windows and it passed all the times. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments: Methods changed to static,collector changed to collect(toList()),comment updated ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7296/files - new: https://git.openjdk.java.net/jdk/pull/7296/files/7de54ad4..bbbb0d7e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=03-04 Stats: 13 lines in 1 file changed: 2 ins; 2 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Fri Feb 4 12:14:50 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 12:14:50 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v6] In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: > Write a regression test for JDK-4659800. > This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. > This test is run 10 times on windows and it passed all the times. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments: Aligned all stream operations with .stream ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7296/files - new: https://git.openjdk.java.net/jdk/pull/7296/files/bbbb0d7e..f1fecef2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7296&range=04-05 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/7296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7296/head:pull/7296 PR: https://git.openjdk.java.net/jdk/pull/7296 From aivanov at openjdk.java.net Fri Feb 4 14:24:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 4 Feb 2022 14:24:13 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v4] In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: <_-6lSALE_YVgpLiA4eesaHPKI12EPF5DQO5D8nhcwCY=.69a862fe-9efc-4659-b797-948cc829e3ba@github.com> On Fri, 4 Feb 2022 10:45:23 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comments - Filtered out Windows LnFs,removed JTextField,updated Summary > > test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 96: > >> 94: .filter(laf -> laf.getName().startsWith("Windows")) >> 95: .map(laf -> laf.getClassName()) >> 96: .collect(Collectors.toList()); > > Just a note. You can align the chained calls with the first `.stream` one. Here, it nearly fits into 80-column limit and doesn't exceed 100-column limit. I don't know if there are any guidelines in this regard for java.desktop module. It's up to you. > > IDE recommends replacing `.collect(Collectors.toList()` with `.toList()` ? looks cleaner, doesn't it? > > It also recommends replacing lambda expression `laf -> laf.getClassName()` with method reference `UIManager.LookAndFeelInfo::getClassName`, yet the former seems to convey the intent clearer. I can't find your comment that you can't find `.toList()`. The [`toList`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/Stream.html#toList()) method in `Stream` is available since Java 16 only. I was referring to this method rather than static import of `Collectors.toList` but it's fine. Using `Collectors.toList` makes backporting, if you're planning it, easier. If you don't plan backporting, then using the newly added method sounds better to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From aivanov at openjdk.java.net Fri Feb 4 15:06:10 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 4 Feb 2022 15:06:10 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v6] In-Reply-To: References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Fri, 4 Feb 2022 12:14:50 GMT, Manukumar V S wrote: >> Write a regression test for JDK-4659800. >> This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. >> This test is run 10 times on windows and it passed all the times. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments: Aligned all stream operations with .stream Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Fri Feb 4 14:57:13 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 14:57:13 GMT Subject: RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800 [v4] In-Reply-To: <_-6lSALE_YVgpLiA4eesaHPKI12EPF5DQO5D8nhcwCY=.69a862fe-9efc-4659-b797-948cc829e3ba@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> <_-6lSALE_YVgpLiA4eesaHPKI12EPF5DQO5D8nhcwCY=.69a862fe-9efc-4659-b797-948cc829e3ba@github.com> Message-ID: On Fri, 4 Feb 2022 14:20:59 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 96: >> >>> 94: .filter(laf -> laf.getName().startsWith("Windows")) >>> 95: .map(laf -> laf.getClassName()) >>> 96: .collect(Collectors.toList()); >> >> Just a note. You can align the chained calls with the first `.stream` one. Here, it nearly fits into 80-column limit and doesn't exceed 100-column limit. I don't know if there are any guidelines in this regard for java.desktop module. It's up to you. >> >> IDE recommends replacing `.collect(Collectors.toList()` with `.toList()` ? looks cleaner, doesn't it? >> >> It also recommends replacing lambda expression `laf -> laf.getClassName()` with method reference `UIManager.LookAndFeelInfo::getClassName`, yet the former seems to convey the intent clearer. > > I can't find your comment that you can't find `.toList()`. > > The [`toList`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/Stream.html#toList()) method in `Stream` is available since Java 16 only. > > I was referring to this method rather than static import of `Collectors.toList` but it's fine. > > Using `Collectors.toList` makes backporting, if you're planning it, easier. If you don't plan backporting, then using the newly added method sounds better to me. Yes, I'm planning to backport it to lower releases, so I'm keeping this as such. I deleted that comment because I thought you may be mentioning about that static import. ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From mvs at openjdk.java.net Fri Feb 4 15:28:14 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 4 Feb 2022 15:28:14 GMT Subject: Integrated: 8280948: [TESTBUG] Write a regression test for JDK-4659800 In-Reply-To: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> References: <021RkKyb5oOuzz7664TJ1DTeW7bINg_0562rSy1I-eI=.ca3a2d39-adfa-43eb-b125-a1d01fad12d9@github.com> Message-ID: On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S wrote: > Write a regression test for JDK-4659800. > This test checks whether typing 'Enter' key generates ActionEvent on focused Button or not, in Windows and Windows Classic Look And Feels in Windows platform. > This test is run 10 times on windows and it passed all the times. This pull request has now been integrated. Changeset: 66b2c3b6 Author: Manukumar V S Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/66b2c3b66e253ac3d8718c0c6d7c7551dbe04001 Stats: 124 lines in 1 file changed: 124 ins; 0 del; 0 mod 8280948: [TESTBUG] Write a regression test for JDK-4659800 Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7296 From duke at openjdk.java.net Fri Feb 4 16:45:40 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 4 Feb 2022 16:45:40 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails In-Reply-To: References: Message-ID: On Fri, 28 Jan 2022 21:03:48 GMT, lawrence.andrews wrote: > 1) Removed =yesno that was causing the test to fail with following exception > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > After removing =yesno, test was just passing without user interaction so fixed the following > > Add the following so that user can user interact with the test > a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. > b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. > > @shurymury Added @requires (os.family != "mac") to skip test execution on mac ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From duke at openjdk.java.net Fri Feb 4 16:45:38 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 4 Feb 2022 16:45:38 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v2] In-Reply-To: References: Message-ID: > 1) Removed =yesno that was causing the test to fail with following exception > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > After removing =yesno, test was just passing without user interaction so fixed the following > > Add the following so that user can user interact with the test > a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. > b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Execute test all platform other than mac ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7275/files - new: https://git.openjdk.java.net/jdk/pull/7275/files/d04da965..63a66197 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7275.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7275/head:pull/7275 PR: https://git.openjdk.java.net/jdk/pull/7275 From duke at openjdk.java.net Fri Feb 4 18:46:39 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 4 Feb 2022 18:46:39 GMT Subject: RFR: 8281284 : Write JSlider accessibility test Message-ID: This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) @shurymury @savoptik ------------- Commit messages: - 8281284 : Write JSlider accessibility test Changes: https://git.openjdk.java.net/jdk/pull/7355/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7355&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281284 Stats: 247 lines in 1 file changed: 247 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7355.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7355/head:pull/7355 PR: https://git.openjdk.java.net/jdk/pull/7355 From prr at openjdk.java.net Fri Feb 4 22:24:07 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 4 Feb 2022 22:24:07 GMT Subject: RFR: 8281284 : Write JSlider accessibility test In-Reply-To: References: Message-ID: <_nPzvIVg-fWsxgOkDtzxSI_lZ_1LufRtKeL1rZNsER8=.7ec1a605-4290-458e-b069-054e4fd4df7a@github.com> On Fri, 4 Feb 2022 18:39:52 GMT, lawrence.andrews wrote: > This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) > > @shurymury > @savoptik test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 28: > 26: * @bug 8262981 > 27: * @summary Test JSlider Accessibility > 28: * @run main JSliderAccessibilityTest Looks to me as if this needs @key headful since it creates a JFrame etc. ------------- PR: https://git.openjdk.java.net/jdk/pull/7355 From duke at openjdk.java.net Fri Feb 4 22:34:47 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 4 Feb 2022 22:34:47 GMT Subject: RFR: 8281284 : Write JSlider accessibility test [v2] In-Reply-To: References: Message-ID: > This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) > > @shurymury > @savoptik lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Added @key headful ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7355/files - new: https://git.openjdk.java.net/jdk/pull/7355/files/410441a8..0e1f269f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7355&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7355&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7355.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7355/head:pull/7355 PR: https://git.openjdk.java.net/jdk/pull/7355 From duke at openjdk.java.net Sat Feb 5 01:32:09 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Sat, 5 Feb 2022 01:32:09 GMT Subject: RFR: 8281284 : Write JSlider accessibility test [v2] In-Reply-To: <_nPzvIVg-fWsxgOkDtzxSI_lZ_1LufRtKeL1rZNsER8=.7ec1a605-4290-458e-b069-054e4fd4df7a@github.com> References: <_nPzvIVg-fWsxgOkDtzxSI_lZ_1LufRtKeL1rZNsER8=.7ec1a605-4290-458e-b069-054e4fd4df7a@github.com> Message-ID: On Fri, 4 Feb 2022 22:20:32 GMT, Phil Race wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Added @key headful > > test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 28: > >> 26: * @bug 8262981 >> 27: * @summary Test JSlider Accessibility >> 28: * @run main JSliderAccessibilityTest > > Looks to me as if this needs @key headful since it creates a JFrame etc. Added @key headful ------------- PR: https://git.openjdk.java.net/jdk/pull/7355 From prr at openjdk.java.net Sat Feb 5 18:12:11 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:12:11 GMT Subject: RFR: 8281284 : Write JSlider accessibility test [v2] In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 22:34:47 GMT, lawrence.andrews wrote: >> This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) >> >> @shurymury >> @savoptik > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Added @key headful Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7355 From prr at openjdk.java.net Sat Feb 5 18:14:12 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:14:12 GMT Subject: RFR: 8166050: partialArray is not created in javax.swing.text.html.parser.NPrintWriter.println(...) method In-Reply-To: References: Message-ID: <8RXWtcgICJJRdWyibErQMkLm3hzieohf7RDC8hSRuOw=.9955f122-7065-410c-b1c3-ad43a97ab0df@github.com> On Thu, 3 Feb 2022 06:59:35 GMT, Prasanta Sadhukhan wrote: > The uninitialized "partialArray" in NPrintWriter.println() can cause NPE in System.arraycopy . > But it is seen that NPrintWriter class embedded in TagStack class file cannot be used by application as it is not a public class and not an inner class too and also there's no object of it created in TagStack class to access NPrintWriter and there's no instances of accessing NPrintWriter in jdk. > So, it seems prudent to remove instead of fixing this ununsed, unaccessible class . Build and jtreg tests are ok. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7332 From prr at openjdk.java.net Sat Feb 5 18:16:04 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:16:04 GMT Subject: RFR: 8280820: Clean up bug8033699 and bug8075609.java tests: regtesthelpers aren't used In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:38:36 GMT, Alexey Ivanov wrote: > Removed references to `regtesthelpers` libarary which isn't used. > Organised imports and replaced anonymous classes with lambda expressions. > > Put `waitForIdle` before the test execution starts and moved the frame to the centre of the screen. > > The CI with the updated tests is green. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7322 From prr at openjdk.java.net Sat Feb 5 18:42:08 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:42:08 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding [v2] In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 23:35:42 GMT, DamonGuy wrote: >> Html does not fit in JButton at certain sizes because default Insets cause html to be displayed off-center. >> >> Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable clipping if html does not fit, similar to regular text. AquaButtonUI.java now detects when html does not fit, and an implementation for alternate insets that are recursively tested for regular text inside layoutAndGetText() are now also being used for html content. >> >> Created test (Bug8015854.java) with the same format as the test described on the issue. The button is of size 37x37 with an image of a red square sized 19x19. The test checks for red pixels on the edges of where the square image should be from the center of the button. The test fails with the non-changed jdk, but passes with the changes. > > DamonGuy has updated the pull request incrementally with two additional commits since the last revision: > > - Add cycling of all installed LAFs. Add image generation to avoid saving an image to repo. > - Changed frame to dispose regardless of passing or failing. " I discovered that the issue exists for Aqua LAF as described, but also other LAFs (such as Metal and Basic)." BTW there is no such L&F as "Basic" - it is just used as the basis for other concrete L&Fs such as Metal. src/java.desktop/share/classes/javax/swing/SwingUtilities.java line 1129: > 1127: v = (c != null) ? (View) c.getClientProperty("html") : null; > 1128: if (v != null) { > 1129: if(availTextWidth < (int) v.getPreferredSpan(View.X_AXIS)){ Can you attach "before" and "after" images into the bug report as part of the evaluation ? Do this for Aqua and Metal too. I presume this code only gets entered for labels with images ? If this is all L&Fs then please manually test on mac. Windows and GTK L&Fs using SwingSet2 looking for problems as well as running all automated client tests using mach5. We do not use syntax like "if(" and "else{". It should always be "if (" and "else {" Also no space after (int) for the cast. lines 1129 and 1134 .. And make sure lines are <=80 characters long which that one 1134 doesn't look to be. test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java line 2: > 1: /* > 2: * Copyright 2022 JetBrains s.r.o. I am reasonably sure you work for Oracle, not JetBrains. I don't know where you got this (c) from but it should be a standard Oracle copyright + GPL v2 as used by tests. test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java line 77: > 75: > 76: // generate red_square.png image to use as JButton text > 77: SwingUtilities.invokeAndWait(() -> { generateImage isn't doing anything that needs to be run on the EDT. Get rid of invokeAndWait here. test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java line 103: > 101: // close frame when complete > 102: SwingUtilities.invokeAndWait(() -> { > 103: frame.dispose(); unless I am missing something you are creating a new JFrame for every call to createAndShowGUI() and over-writing the frame variable each time . so only the last one can be being disposed by this call, no ? In fact you aren't even hiding them, so doesn't the screen get cluttered with a stack of them ? Maybe you should only create the UI once and just update its L&F each time through. test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java line 175: > 173: try { > 174: if (ImageIO.write(bImg, "png", new File(srcDir + "/red_square.png"))) > 175: { You do NOT want to write an image into the srcDir. In some cases it may not even be writable. That would be a great place to get an image that comes along with the source but NOT for an image created on the fly. You should be using TESTCLASSES or the system property test.classes (verify the name of that - I am going from memory) test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java line 179: > 177: } > 178: } catch (IOException e) { > 179: e.printStackTrace(); If this fails, your test fails, doesn't it ? Might as well propagate the exception and let the test exit with the IOException .. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From prr at openjdk.java.net Sat Feb 5 18:44:08 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:44:08 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v2] In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 16:45:38 GMT, lawrence.andrews wrote: >> 1) Removed =yesno that was causing the test to fail with following exception >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> After removing =yesno, test was just passing without user interaction so fixed the following >> >> Add the following so that user can user interact with the test >> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. >> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Execute test all platform other than mac Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From prr at openjdk.java.net Sat Feb 5 18:45:19 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:45:19 GMT Subject: RFR: JDK-6998249: Wrong behavior/Javadoc of JTable.tableChanged(TableModelEvent e) In-Reply-To: References: Message-ID: On Thu, 27 Jan 2022 22:11:27 GMT, Harshitha Onkar wrote: > Updated JTable's tableChanged() method docs to explicitly mention the coordinate system of the rows and columns. Unless your investigation uncovers new information, it seems like this PR will be withdrawn and the bug report closed as not an issue. What is the status of that investigation ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7253 From prr at openjdk.java.net Sat Feb 5 18:54:08 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 5 Feb 2022 18:54:08 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: <5pzIWmevu8MxxEdYInF4OOfcN4Wyqleay-Sno1UpRQg=.5e22833e-a331-460c-8e24-d62f8083dcc5@github.com> On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan wrote: > If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout. > This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly. "This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly." I know nothing about this area, so some questions. " although " ? " is construed as "complex" char and inserted properly " Since we had no special treatment of this char, what was treating it as complex and why ? Why do we need to make s be a complex char (whatever that actually means here ??) in order to display as s ?? Sounds backwards. Really I just can't make sense of the explanation. Can you point me to docs as well as re-explaining it ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From serb at openjdk.java.net Sun Feb 6 08:37:09 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 6 Feb 2022 08:37:09 GMT Subject: RFR: 8281284 : Write JSlider accessibility test [v2] In-Reply-To: References: Message-ID: <7VvKxnFl7P5VP0YzN9JRMhwNZTPShZHU8TKYQgxkW_k=.1a1d6447-19a3-4480-8ea6-1acd9632f8fc@github.com> On Fri, 4 Feb 2022 22:34:47 GMT, lawrence.andrews wrote: >> This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) >> >> @shurymury >> @savoptik > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Added @key headful test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 2: > 1: /* > 2: * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. Is it a new test or it is based on some old code? test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 72: > 70: > 71: public static void test() { > 72: AccessibleContext accessibleContext = jSlider.getAccessibleContext(); Per the spec you can check that this is an instance of AccessibleJSlider test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 125: > 123: throw new RuntimeException("AccessibleStateSet shouldn't contain both HORIZONTAL and VERTICAL"); > 124: } > 125: if (jSlider.getOrientation() != jSlider.HORIZONTAL) { Shouldn't the test creates a sliders using different orientations? test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 176: > 174: } > 175: > 176: if (!accessibleAction.getAccessibleActionDescription(0).equals("increment")) { Instead of "string" the AccessibleAction.INCREMENT/DECREMENT constants should be used. test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 184: > 182: } > 183: > 184: if (accessibleAction.getAccessibleActionDescription(-1) != null) { I suggest to check 2 as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/7355 From serb at openjdk.java.net Sun Feb 6 08:40:15 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 6 Feb 2022 08:40:15 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v2] In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 16:45:38 GMT, lawrence.andrews wrote: >> 1) Removed =yesno that was causing the test to fail with following exception >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> After removing =yesno, test was just passing without user interaction so fixed the following >> >> Add the following so that user can user interact with the test >> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. >> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Execute test all platform other than mac test/jdk/java/awt/Graphics/TextAAHintsTest.java line 231: > 229: } > 230: } finally { > 231: frame.dispose(); The frame should be disposed on the EDT. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From tnakamura at openjdk.java.net Sun Feb 6 18:43:15 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Sun, 6 Feb 2022 18:43:15 GMT Subject: Integrated: 8139173: [macosx] JInternalFrame shadow is not properly drawn In-Reply-To: References: Message-ID: On Wed, 26 Jan 2022 06:53:42 GMT, Toshio Nakamura wrote: > JInternalFrame's bottom area is not properly drawn with Aqua LAF. > This problem remained for long time, but we recognized it recently. > > According to the bug report, it depends on MacOS's version. I don't have old ones (10.10 and 10.11 in the report), but the current MacOS can recreate the issue. I confirmed the following OS versions recreated this issue and this patch could solve it. > > Mojave 10.14.6 > Catalina 10.15.7 > Big Sur 11.6.2 > Monterey 12.1 > > jtreg "javax/swing" and "java/awt" have no regression. This pull request has now been integrated. Changeset: f7814c12 Author: Toshio Nakamura Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/f7814c120bf84d7e9b459f81a6ce19b44fa122ec Stats: 147 lines in 2 files changed: 143 ins; 2 del; 2 mod 8139173: [macosx] JInternalFrame shadow is not properly drawn Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7228 From prr at openjdk.java.net Sun Feb 6 18:56:04 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 18:56:04 GMT Subject: RFR: 8264743: Add forRemoval for deprecated classes and method in javax/swing/plaf/basic In-Reply-To: References: Message-ID: On Mon, 24 Jan 2022 09:38:09 GMT, Prasanta Sadhukhan wrote: > Few methods and classes were deprecated in JDK-8049700 where it was decided to add forRemoval in jdk19. > Added "forRemoval" to start the process of removing in near future jdk release. "where it was decided to add forRemoval " The actual sequence was that the previous fix proposed for Removal but even a cursory search found that external L&Fs uses these What was *decided* was to not do forRemoval then and it was *suggested* it could be a follow-up bug for a later release, as proposed here. But I don't see sign we've tried to engage with the maintainers of those L&Fs. Because Swing is so widely used I suspect what was found is not all of i and forRemoval in Swing has a high probability of breaking some apps. So we can do this now but we should not remove until after the next LTS which is JDK 12. So JDK 22. And in the interim I strongly suggest some outreach to any L&Fs that might be broken, ------------- PR: https://git.openjdk.java.net/jdk/pull/7194 From prr at openjdk.java.net Sun Feb 6 19:03:11 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 19:03:11 GMT Subject: RFR: 8264743: Add forRemoval for deprecated classes and method in javax/swing/plaf/basic In-Reply-To: References: Message-ID: On Mon, 24 Jan 2022 09:38:09 GMT, Prasanta Sadhukhan wrote: > Few methods and classes were deprecated in JDK-8049700 where it was decided to add forRemoval in jdk19. > Added "forRemoval" to start the process of removing in near future jdk release. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7194 From prr at openjdk.java.net Sun Feb 6 19:57:07 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 19:57:07 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: <9z6OvfZmJiuuxWhAppwH1ahC_oPUM1aWSEofGBHtsWM=.f978f298-f131-4595-a3da-91ab2de7e86a@github.com> On Tue, 1 Feb 2022 21:40:53 GMT, Dmitry Batrak wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision: > > remove 'headful' requirement from test case > As you say, one could possibly also try to compare font2DHandle-s instead, > but that would require forcing the population of that field in equals method, > which seems to have larger potential for side effects. Yes, I noted this would present even more problems. > Of course, there's an alternative method to fix this - make font metrics cache distinguish such fonts explicitly, > .... I believe, would just mean waiting for other trouble in future. I was getting at this with my comment > I do see that it would be tricky to have some private extra equality testing in the code that finds the right fall back But it wasn't (isn't) clear to me without tracking this down if some piece of the implementation is making some assumptions it perhaps shouldn't. But yes, very likely not going to work exactly like that. Taking a look I think the problem starts with getCompositeFontUIResource() So another approach is to define a subclass of FontUIResource in which it over-rides hashCode() and equals() and does the extra comparison needed. It would only be equal to another CompositeFontUIResource with the same base font sun.font.CompositeFontUIResource extends FontUIResource { ... public void boolean equals(Object o) { return (o instanceof CompositeFontUIResource && super.equals(o); } Then in sun.font.FontUtilities we add if (compFont == null) { compFont = new CompositeFont(physicalFont, dialog2D); compMap.put(physicalFont, compFont); } + fuir = new CompositeFontUIResource(font); FontAccess.getFontAccess().setFont2D(fuir, compFont.handle); The explanation about JCK indicates that JCK could also obtain a font from Swing that has fallbacks, serialize it and on deserialization currently it would be equal but after this fix it would not. So I don't see the difference except that there (presumably) happens not to be a JCK test for this scenario ... However since JCK isn't part of OpenJDK I don't think we can discuss it any further here. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From prr at openjdk.java.net Sun Feb 6 21:13:04 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 21:13:04 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux In-Reply-To: References: Message-ID: <8GzyP8csYnQrcXmbheSp38y9BFrNCGF-7_DoNfIA9Y4=.e425ea5e-6066-456f-868f-7d278a75c394@github.com> On Fri, 21 Jan 2022 17:02:38 GMT, Maxim Kartashev wrote: > These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: > 1. `makeDefaultConfig()` returning `NULL`. > 2. A race condition when the number of screens changes. > The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. > > The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. > > The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. > > We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. "probably we should follow this [suggestion](https://github.com/openjdk/jdk/blob/6765f902505fbdd02f25b599f942437cd805cad1/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java#L58) and everywhere the "screen" is used under the awt lock (1)check that it is less than the number of screens and use 0(main screen as a fallback)," Even if "everywhere" is too hard, can't we just do this in the native methods where the crashes are being seen ? Then no locks have to change .. and we can be more targeted to these known, but not reproducible, crashes. If you can force a crash in one of these then prove you can avoid it that would help too. As it is this fix is not really "reviewable" in the sense that no amount of staring at the code is likely to be enough. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From prr at openjdk.java.net Sun Feb 6 21:14:05 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 21:14:05 GMT Subject: RFR: 8280132: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder In-Reply-To: References: Message-ID: <4WBSDytGNm18EZL3RoLHwO_kUNJf3LAB2DMvPZjrYtw=.825d64fa-be4c-4a4c-8992-54f011a393db@github.com> On Sun, 23 Jan 2022 07:41:39 GMT, Sergey Bylokhov wrote: > In jdk 9 we started to sort the list of methods for each class for two reasons: > 1. We had a number of bugs which state that our JavaBeans randomly does not work, examples: JDK-6807471[1] , JDK-6788525[2], the reason was that the order of methods from Class.getMethods() is not specified. > 2. We tried to sort methods so the more specific returns types come first, this was done because our logic for selecting the correct method did not work properly. > > The second issue above was fixed by the separate change [JDK-8196373](https://bugs.openjdk.java.net/browse/JDK-8196373) so now we only need to sort the list of methods in any order and do not care about return types. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7190 From prr at openjdk.java.net Sun Feb 6 21:17:07 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 21:17:07 GMT Subject: Integrated: 8279878: java/awt/font/JNICheck/JNICheck.sh test fails on Ubuntu 21.10 In-Reply-To: References: Message-ID: On Fri, 14 Jan 2022 19:09:53 GMT, Phil Race wrote: > Some more signal handler related warning strings from the VM need to be excluded from what this test considers a failure > > See the bug for more info. This pull request has now been integrated. Changeset: 2f48a3f0 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/2f48a3f032dcfe159a7ab4a3d0afd0a0760d0a04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8279878: java/awt/font/JNICheck/JNICheck.sh test fails on Ubuntu 21.10 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7091 From prr at openjdk.java.net Sun Feb 6 21:25:12 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 21:25:12 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI [v3] In-Reply-To: References: Message-ID: On Thu, 27 Jan 2022 21:47:04 GMT, lawrence.andrews wrote: >> 1) Test scenario was just showing test instruction with JTextArea. So added the JTextArea as the instruction and method says. >> 2) JTextArea is filled with contents so that and an Emoji character making sure that screen reader can read Emoji also. >> 3) Now user can user arrow keys to navigate the JTextArea and screen reader can read it. >> >> @shurymury >> >> Attached the screen shot of the test UI which contains JTextArea along with the instruction. >> Screen Shot 2021-12-14 at 7 09 14 PM > > lawrence.andrews 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 branch 'master' of https://github.com/openjdk/jdk into jdk-8278828-ws > - Fixed instruction for createTextArea() > - Merge branch 'openjdk:master' into jdk-8278828-ws > - Added JTextArea createTextArea() in AccessibleTextTest.java This seems to have changed so much from the initial commit that I was really confused. In fact it seems to have been mostly reverted and the image doesn't apply etc. I'd even go so far as to say this is 'not a bug'. The only thing left is adding the word non-editable and I am unable to see what that has to do with the bug report .. or anything else .. ------------- PR: https://git.openjdk.java.net/jdk/pull/6844 From prr at openjdk.java.net Sun Feb 6 21:50:10 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 6 Feb 2022 21:50:10 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: Message-ID: <_lT1ihu773QLjjWmUOI5XYg0-j1xFrqz8WZSNJ56auc=.b9be5bda-0d47-450b-9523-e4fac6bbf243@github.com> On Thu, 28 Oct 2021 08:27:44 GMT, Masanori Yano wrote: >> Could you please review the 8275715 bug fixes? >> >> I think D3DScreenUpdateManager posts unnecessary PaintEvent during processing PaintEvent. When the validate method is called from createGraphics, repaintPeerTarget should not be called. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8275715: D3D pipeline processes multiple PaintEvent at initial drawing The problem I have with this is that this being in createGraphics() isn't obviously relevant to me. The repaintPeerTarget() is called only if the surface is lost which means it needs repainting. Or does surface lost here perhaps mean "surface has not yet been created", because we aren't yet showing the window contents at all and we really should wait for the first paint event ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From prr at openjdk.java.net Mon Feb 7 03:42:06 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 7 Feb 2022 03:42:06 GMT Subject: RFR: 8276849: Refresh the window icon on graphics configuration changes In-Reply-To: References: Message-ID: <6TdoC_iI5Dqtb14XMLvsUQHGCG_R0FQhKtSYC0KLXzo=.9f0b8d54-686c-463a-9da0-c8e749117317@github.com> On Sun, 31 Oct 2021 08:21:58 GMT, Emmanuel Bourg wrote: > When a list of icons is set on a window, the most appropiate icon is selected depending on the graphics configuration. But if the graphics configuration changes (because the window is moved to a different screen, or because the DPI settings of the screen is changed), the frame icon isn't updated. > > Here is an example illustrating the issue: > > public static void main(String[] args) throws Exception { > SwingUtilities.invokeLater(() -> { > JFrame frame = new JFrame("Window Icon Test"); > frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); > frame.setSize(400, 300); > frame.setVisible(true); > > List images = new ArrayList<>(); > for (int size = 16; size <= 32; size++) { > // create an image displaying the size used > BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); > Graphics2D g = image.createGraphics(); > g.setFont(new Font("dialog", Font.BOLD, 12)); > g.setColor(Color.BLACK); > g.drawString(String.valueOf(size), 0, size - (size - g.getFont().getSize()) / 2); > images.add(image); > } > > frame.setIconImages(images); > }); > } > > On Windows if the screen scaling is set to 100% the 16x16 icon is picked from the list. If the scaling of the screen is set to 150% while the application is running, the 16x16 icon is upscaled and looks blurry. > > A way to work around this issue is to listen for graphics configuration changes with: > > frame.addPropertyChangeListener("graphicsConfiguration", event -> frame.setIconImages(frame.getIconImages())); > > > Ideally this should be done automatically by the JDK. Maybe the `WindowPeer` could call `updateIconImages()` when `updateGraphicsData()` or `displayChanged()` is invoked? This is just waiting for a test .. ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From prr at openjdk.java.net Mon Feb 7 03:42:06 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 7 Feb 2022 03:42:06 GMT Subject: RFR: 8276849: Refresh the window icon on graphics configuration changes In-Reply-To: References: Message-ID: On Thu, 6 Jan 2022 09:09:04 GMT, Emmanuel Bourg wrote: >> When a list of icons is set on a window, the most appropiate icon is selected depending on the graphics configuration. But if the graphics configuration changes (because the window is moved to a different screen, or because the DPI settings of the screen is changed), the frame icon isn't updated. >> >> Here is an example illustrating the issue: >> >> public static void main(String[] args) throws Exception { >> SwingUtilities.invokeLater(() -> { >> JFrame frame = new JFrame("Window Icon Test"); >> frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); >> frame.setSize(400, 300); >> frame.setVisible(true); >> >> List images = new ArrayList<>(); >> for (int size = 16; size <= 32; size++) { >> // create an image displaying the size used >> BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); >> Graphics2D g = image.createGraphics(); >> g.setFont(new Font("dialog", Font.BOLD, 12)); >> g.setColor(Color.BLACK); >> g.drawString(String.valueOf(size), 0, size - (size - g.getFont().getSize()) / 2); >> images.add(image); >> } >> >> frame.setIconImages(images); >> }); >> } >> >> On Windows if the screen scaling is set to 100% the 16x16 icon is picked from the list. If the scaling of the screen is set to 150% while the application is running, the 16x16 icon is upscaled and looks blurry. >> >> A way to work around this issue is to listen for graphics configuration changes with: >> >> frame.addPropertyChangeListener("graphicsConfiguration", event -> frame.setIconImages(frame.getIconImages())); >> >> >> Ideally this should be done automatically by the JDK. Maybe the `WindowPeer` could call `updateIconImages()` when `updateGraphicsData()` or `displayChanged()` is invoked? > > 1. Run the test code on a screen with DPI scaling set to 100%, the frame icon displayed should be "16" > > ![image](https://user-images.githubusercontent.com/54304/148357766-541ebc0d-343a-4135-a2a6-d4a57e60f446.png) > > 2. Change the DPI scaling of the screen (or move the frame to a secondary screen with a different scaling), the frame icon should change ("20" at 125%, "24" at 150%) > > ![image](https://user-images.githubusercontent.com/54304/148357980-457068b0-cdd0-43e7-b4dc-6d7c10c78b68.png) @ebourg can you add one ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From prr at openjdk.java.net Mon Feb 7 03:45:16 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 7 Feb 2022 03:45:16 GMT Subject: RFR: 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled [v4] In-Reply-To: References: Message-ID: On Thu, 6 Jan 2022 02:49:17 GMT, Toshio Nakamura wrote: >> Hi, >> >> Could you review the fix? >> When non-English characters were printed from JTable on MacOS, CTextPipe.doDrawGlyphs was called by OSXSurfaceData.drawGlyphs. However, CTextPipe seems not support glyph with slot number of composite fonts. >> >> The slot data mask of GlyphVector is 0xff000000. In my environment, Japanese font was loaded at slot 4, and glyph data is like [0x40003e5]. Then, unexpected glyph was drawn. > > Toshio Nakamura 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: > > - Revised according to review comments > - Merge branch 'master' into 8240756 > - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled > - revert previous proposal > - Merge branch 'master' into 8240756 > - 2nd proposal > - Revert previous change > - Merge branch 'master' into 8240756 > merge master > - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled Ok. approved. An improvement but maybe there'll be some tweaks needed later. ------------- PR: https://git.openjdk.java.net/jdk/pull/3619 From prr at openjdk.java.net Mon Feb 7 03:47:11 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 7 Feb 2022 03:47:11 GMT Subject: RFR: 8269806: Emoji rendering on Linux In-Reply-To: References: Message-ID: On Sat, 30 Oct 2021 20:12:00 GMT, Phil Race wrote: >> @prrace could you take a look, please? > > @YaaZ nothing has really happened here in > 2 months. When can we expect an update ? > Hi @prrace! By X11 pipeline, do you mean `-Dsun.java2d.xrender=false`? Because I wasn't able to reproduce this on Ubuntu 20.04 Yes and -Dsun.java2d.opengl=True Can't remember if I tried the latter but the former was garbage for me. ------------- PR: https://git.openjdk.java.net/jdk/pull/4798 From psadhukhan at openjdk.java.net Mon Feb 7 04:51:11 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 7 Feb 2022 04:51:11 GMT Subject: Integrated: 8166050: partialArray is not created in javax.swing.text.html.parser.NPrintWriter.println(...) method In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 06:59:35 GMT, Prasanta Sadhukhan wrote: > The uninitialized "partialArray" in NPrintWriter.println() can cause NPE in System.arraycopy . > But it is seen that NPrintWriter class embedded in TagStack class file cannot be used by application as it is not a public class and not an inner class too and also there's no object of it created in TagStack class to access NPrintWriter and there's no instances of accessing NPrintWriter in jdk. > So, it seems prudent to remove instead of fixing this ununsed, unaccessible class . Build and jtreg tests are ok. This pull request has now been integrated. Changeset: 5dfff740 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/5dfff7406ef3dc37a77ce9545f6f56c49b41e466 Stats: 40 lines in 1 file changed: 0 ins; 40 del; 0 mod 8166050: partialArray is not created in javax.swing.text.html.parser.NPrintWriter.println(...) method Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7332 From psadhukhan at openjdk.java.net Mon Feb 7 07:56:08 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 7 Feb 2022 07:56:08 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan wrote: > If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout. > This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly. Actually, this method "insertText" gets called when the user commits text generated from an input method, which in this case, is from Finnish keyboard layout []https://github.com/openjdk/jdk/blame/master/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m#L946 I don't think there is any docs for it and most of it came along with the macos port. The "complex" char is basically the "aStringIsComplex" condition I am talking about. As per the conditions written in this method []https://github.com/openjdk/jdk/blame/master/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m#L975-L991 [] the Input method event is generated or CInputMethod#insertText for that **particular language** is called only when these conditions are satisfied. If these conditions are not met, then keyevent gets handled by CPlatformResponder#handleKeyEvent without taking "current "language " into account "s" is therefore routed through CInputMethod#insertText by satisfying the condition so that it gets inserted as per Finnish "language" selected. ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From mvs at openjdk.java.net Mon Feb 7 08:28:40 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 7 Feb 2022 08:28:40 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 Message-ID: Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. ------------- Commit messages: - 8281296: Create a regression test for JDK-4515999 Changes: https://git.openjdk.java.net/jdk/pull/7363/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7363&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281296 Stats: 169 lines in 1 file changed: 169 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7363/head:pull/7363 PR: https://git.openjdk.java.net/jdk/pull/7363 From mvs at openjdk.java.net Mon Feb 7 08:28:41 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 7 Feb 2022 08:28:41 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 In-Reply-To: References: Message-ID: <5C77HNVTlmusndlFIxzs_fN16Iioadj_ZLS5pyErgxc=.c83a2541-27e5-47bd-a87a-cc1cb3fefe5c@github.com> On Mon, 7 Feb 2022 08:18:23 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. @aivanov-jdk Can you please review this? ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From psadhukhan at openjdk.java.net Mon Feb 7 08:59:12 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 7 Feb 2022 08:59:12 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v5] In-Reply-To: References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> Message-ID: On Fri, 4 Feb 2022 06:36:59 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 106: >> >>> 104: if(lowerLeft.getRGB() == WHITE_RGB || lowerRight.getRGB() == WHITE_RGB) >>> 105: { >>> 106: throw new RuntimeException("JTableHeader Bottom Border not visible"); >> >> Not sure this check is correct. If we have dark theme or the background is changed in system, then I guess the test will fail even with fix. Maybe you can set the JTable background to white explicitly. > > @prsadhuk The fix and test case is ready for review. I have marked the testcase as mac-only. I see it fails for me in mac 10.15..DId you see it pass locally for you and in CI systems? Also, it should show 3 rows including row showing "A""B""C" as it is shown in windows/ubuntu, why it is showing only 1 row here? Screenshot 2022-02-07 at 2 19 08 PM ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From psadhukhan at openjdk.java.net Mon Feb 7 09:09:11 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 7 Feb 2022 09:09:11 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v5] In-Reply-To: References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> Message-ID: <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com> On Mon, 7 Feb 2022 08:56:26 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk The fix and test case is ready for review. I have marked the testcase as mac-only. > > I see it fails for me in mac 10.15..DId you see it pass locally for you and in CI systems? Also, it should show 3 rows including row showing "A""B""C" as it is shown in windows/ubuntu, why it is showing only 1 row here? > > Screenshot 2022-02-07 at 2 19 08 PM I got the 2nd part of the question myself which is because of white gridlines used in AquaLookAndFeel so invisible.. ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From asemenov at openjdk.java.net Mon Feb 7 10:59:17 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Mon, 7 Feb 2022 10:59:17 GMT Subject: RFR: 8281284 : Write JSlider accessibility test [v2] In-Reply-To: References: Message-ID: <4jjNGD2edw9UK5P1W1WMgthuJxr1y1bP1hkswXlt3Uo=.c477cd79-81ed-4af7-a1d8-2e3451b8284f@github.com> On Fri, 4 Feb 2022 22:34:47 GMT, lawrence.andrews wrote: >> This testcase covers both old and new api ( api added in jdk17 getAccessibleAction(), getAccessibleActionCount() , getAccessibleActionDescription ) >> >> @shurymury >> @savoptik > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Added @key headful test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 1: > 1: /* Can you please tell me why you didn't place this test along the path: test/jdk/java/awt/a11y test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 47: > 45: import javax.swing.SwingUtilities; > 46: > 47: public class JSliderAccessibilityTest { You could place your test in this path: test/jdk/java/awt/a11y Then you can inherit it from AccessibleComponentTest, and then all accessibility tests will look the same. test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 68: > 66: frame.setLocationRelativeTo(null); > 67: frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); > 68: frame.setVisible(true); Please add instructions to the test on how to take it on all intended platforms. And also when to consider that the test is passed correctly. ------------- PR: https://git.openjdk.java.net/jdk/pull/7355 From aivanov at openjdk.java.net Mon Feb 7 13:40:16 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 7 Feb 2022 13:40:16 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 08:18:23 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. Does this new test reproduce the original problem reported in JDK-4515999? test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 30: > 28: */ > 29: public class JSpinnerMouseAndKeyPressTest { > 30: //2 days in milliseconds Please add a space after `//` according to [the guidelines](http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-whitespace). In other places too. test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 32: > 30: //2 days in milliseconds > 31: private static final int EXPECTED_VALUE_2_DAYS = 2 * 24 * 60 * 60 * 1000; > 32: private static JFrame frame; I suggest adding a blank line between the constant and the frame to separate them. test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 72: > 70: List lafs = Arrays.stream(getInstalledLookAndFeels()) > 71: .map(UIManager.LookAndFeelInfo::getClassName) > 72: .collect(Collectors.toList()); This is probably a bit too much for just mapping `LookAndFeelInfo` to `lafClassName`? If you like it though, I don't mind. test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 83: > 81: final int spinnerButtonWidth = spinner.getWidth() - > 82: spinnerEditorWidth; > 83: final int spinnerQuarterHeight = spinner.getHeight() / 4; The `spinner` component must be accessed from EDT only. test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 100: > 98: robot.mouseMove(spinnerUpButtonCenter.x, spinnerUpButtonCenter.y); > 99: robot.mousePress(InputEvent.BUTTON1_MASK); > 100: robot.mouseRelease(InputEvent.BUTTON1_MASK); `BUTTON1_MASK` is deprecated in favour of `BUTTON1_DOWN_MASK` test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 102: > 100: robot.mouseRelease(InputEvent.BUTTON1_MASK); > 101: > 102: long upValue = ((Date) spinner.getValue()).getTime(); The `spinner` component must be accessed from EDT only. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7363 From aivanov at openjdk.java.net Mon Feb 7 13:51:04 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 7 Feb 2022 13:51:04 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 08:18:23 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 89: > 87: (spinnerButtonWidth / 2); > 88: spinnerUpButtonCenter.y = spinnerLocationOnScreen.y + > 89: spinnerQuarterHeight; The [Java Style Guidelines](http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-wrapping-lines) suggests breaking before the operators. ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From dbatrak at openjdk.java.net Mon Feb 7 15:09:04 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Mon, 7 Feb 2022 15:09:04 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: On Tue, 1 Feb 2022 21:40:53 GMT, Dmitry Batrak wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision: > > remove 'headful' requirement from test case That's true - after the fix, a font with fallback components will not be equal to the original one after serialization/deserialization. In my opinion, that's OK, as after that it will behave not in the way original font does - that's already the case now. Are you saying that is still a no-go? Then we either need to change the serialization format for `Font` by including a new non-transient field (btw, what's the procedure for that? is that possible? does it require CSR?) so that after deserialization it could 'restore' its fallback components. Or still make that 'more precise' font comparison elsewhere - in font metrics cache and other places. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From mvs at openjdk.java.net Mon Feb 7 15:23:57 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 7 Feb 2022 15:23:57 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v2] In-Reply-To: References: Message-ID: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments: JSpinner access in EDT,formatting changes,BUTTON1_DOWN_MASK,Copyright header ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7363/files - new: https://git.openjdk.java.net/jdk/pull/7363/files/c997a74f..e1213acc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7363&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7363&range=00-01 Stats: 69 lines in 1 file changed: 41 ins; 6 del; 22 mod Patch: https://git.openjdk.java.net/jdk/pull/7363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7363/head:pull/7363 PR: https://git.openjdk.java.net/jdk/pull/7363 From mvs at openjdk.java.net Mon Feb 7 15:23:59 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 7 Feb 2022 15:23:59 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v2] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 13:32:04 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comments: JSpinner access in EDT,formatting changes,BUTTON1_DOWN_MASK,Copyright header > > test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 72: > >> 70: List lafs = Arrays.stream(getInstalledLookAndFeels()) >> 71: .map(UIManager.LookAndFeelInfo::getClassName) >> 72: .collect(Collectors.toList()); > > This is probably a bit too much for just mapping `LookAndFeelInfo` to `lafClassName`? If you like it though, I don't mind. I'm keeping this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From mvs at openjdk.java.net Mon Feb 7 16:23:11 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 7 Feb 2022 16:23:11 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v2] In-Reply-To: References: Message-ID: <1ghOhPMNFCdibFZ6pexC0nzpV7ECsH7Dgq2XYSaRrUw=.8efedb0a-c50d-4ac3-9720-0fca82cd56f9@github.com> On Mon, 7 Feb 2022 13:37:09 GMT, Alexey Ivanov wrote: > Does this new test reproduce the original problem reported in JDK-4515999? Yes it's reproducible in JDK 1.4. ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From duke at openjdk.java.net Mon Feb 7 16:58:12 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 7 Feb 2022 16:58:12 GMT Subject: RFR: JDK-6998249: Wrong behavior/Javadoc of JTable.tableChanged(TableModelEvent e) In-Reply-To: References: Message-ID: On Sat, 5 Feb 2022 18:42:25 GMT, Phil Race wrote: >> Updated JTable's tableChanged() method docs to explicitly mention the coordinate system of the rows and columns. > > Unless your investigation uncovers new information, it seems like this PR will be withdrawn and the bug report closed as not an issue. What is the status of that investigation ? @prrace So far I have tested two conditions where the model to view mapping for row changes is not happening as stated. I'm checking one other scenario and will have an update (and include the details) on this issue by today. ------------- PR: https://git.openjdk.java.net/jdk/pull/7253 From duke at openjdk.java.net Mon Feb 7 17:30:12 2022 From: duke at openjdk.java.net (Emmanuel Bourg) Date: Mon, 7 Feb 2022 17:30:12 GMT Subject: RFR: 8276849: Refresh the window icon on graphics configuration changes In-Reply-To: References: Message-ID: On Sun, 31 Oct 2021 08:21:58 GMT, Emmanuel Bourg wrote: > When a list of icons is set on a window, the most appropiate icon is selected depending on the graphics configuration. But if the graphics configuration changes (because the window is moved to a different screen, or because the DPI settings of the screen is changed), the frame icon isn't updated. > > Here is an example illustrating the issue: > > public static void main(String[] args) throws Exception { > SwingUtilities.invokeLater(() -> { > JFrame frame = new JFrame("Window Icon Test"); > frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); > frame.setSize(400, 300); > frame.setVisible(true); > > List images = new ArrayList<>(); > for (int size = 16; size <= 32; size++) { > // create an image displaying the size used > BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); > Graphics2D g = image.createGraphics(); > g.setFont(new Font("dialog", Font.BOLD, 12)); > g.setColor(Color.BLACK); > g.drawString(String.valueOf(size), 0, size - (size - g.getFont().getSize()) / 2); > images.add(image); > } > > frame.setIconImages(images); > }); > } > > On Windows if the screen scaling is set to 100% the 16x16 icon is picked from the list. If the scaling of the screen is set to 150% while the application is running, the 16x16 icon is upscaled and looks blurry. > > A way to work around this issue is to listen for graphics configuration changes with: > > frame.addPropertyChangeListener("graphicsConfiguration", event -> frame.setIconImages(frame.getIconImages())); > > > Ideally this should be done automatically by the JDK. Maybe the `WindowPeer` could call `updateIconImages()` when `updateGraphicsData()` or `displayChanged()` is invoked? Yes I'll try ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From duke at openjdk.java.net Mon Feb 7 17:35:09 2022 From: duke at openjdk.java.net (DamonGuy) Date: Mon, 7 Feb 2022 17:35:09 GMT Subject: RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding [v2] In-Reply-To: References: Message-ID: On Sat, 5 Feb 2022 18:16:34 GMT, Phil Race wrote: >> DamonGuy has updated the pull request incrementally with two additional commits since the last revision: >> >> - Add cycling of all installed LAFs. Add image generation to avoid saving an image to repo. >> - Changed frame to dispose regardless of passing or failing. > > src/java.desktop/share/classes/javax/swing/SwingUtilities.java line 1129: > >> 1127: v = (c != null) ? (View) c.getClientProperty("html") : null; >> 1128: if (v != null) { >> 1129: if(availTextWidth < (int) v.getPreferredSpan(View.X_AXIS)){ > > Can you attach "before" and "after" images into the bug report as part of the evaluation ? > Do this for Aqua and Metal too. > > I presume this code only gets entered for labels with images ? > If this is all L&Fs then please manually test on mac. Windows and GTK L&Fs using SwingSet2 looking for problems as well as running all automated client tests using mach5. > > We do not use syntax like "if(" and "else{". > It should always be "if (" and "else {" > Also no space after (int) for the cast. lines 1129 and 1134 .. > And make sure lines are <=80 characters long which that one 1134 doesn't look to be. Images will be attached. This code runs for html images as well as html text. I found that the extra padding issue exists for anything bound by the tags. Syntax has been fixed locally and will appear in next commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310 From duke at openjdk.java.net Mon Feb 7 17:47:10 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 7 Feb 2022 17:47:10 GMT Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v5] In-Reply-To: <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com> References: <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com> <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com> Message-ID: On Mon, 7 Feb 2022 09:06:06 GMT, Prasanta Sadhukhan wrote: >> I see it fails for me in mac 10.15..DId you see it pass locally for you and in CI systems? Also, it should show 3 rows including row showing "A""B""C" as it is shown in windows/ubuntu, why it is showing only 1 row here? >> >> Screenshot 2022-02-07 at 2 19 08 PM > > I got the 2nd part of the question myself which is because of white gridlines used in AquaLookAndFeel so invisible.. @prsadhuk It passes in my local (mac 11.6.2) and in CI systems as well. ![image](https://user-images.githubusercontent.com/95945681/152841823-3d41f187-6dda-4e4f-9944-eed2d161c756.png) ![image](https://user-images.githubusercontent.com/95945681/152842688-b8ed2bd2-af04-4e6f-a9b9-0001c1824386.png) ------------- PR: https://git.openjdk.java.net/jdk/pull/7219 From duke at openjdk.java.net Mon Feb 7 18:29:47 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Mon, 7 Feb 2022 18:29:47 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3] In-Reply-To: References: Message-ID: > 1) Removed =yesno that was causing the test to fail with following exception > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > After removing =yesno, test was just passing without user interaction so fixed the following > > Add the following so that user can user interact with the test > a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. > b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Dispose the frame via EDT ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7275/files - new: https://git.openjdk.java.net/jdk/pull/7275/files/63a66197..5b667fa6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=01-02 Stats: 11 lines in 1 file changed: 8 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7275.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7275/head:pull/7275 PR: https://git.openjdk.java.net/jdk/pull/7275 From duke at openjdk.java.net Mon Feb 7 18:29:49 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Mon, 7 Feb 2022 18:29:49 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v2] In-Reply-To: References: Message-ID: On Sun, 6 Feb 2022 08:36:46 GMT, Sergey Bylokhov wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Execute test all platform other than mac > > test/jdk/java/awt/Graphics/TextAAHintsTest.java line 231: > >> 229: } >> 230: } finally { >> 231: frame.dispose(); > > The frame should be disposed on the EDT. Added code to dispose frame with in EDT. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From aivanov at openjdk.java.net Mon Feb 7 22:05:05 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 7 Feb 2022 22:05:05 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v2] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 15:23:57 GMT, Manukumar V S wrote: >> Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) >> Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments: JSpinner access in EDT,formatting changes,BUTTON1_DOWN_MASK,Copyright header test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 111: > 109: spinnerEditorWidth = spinner.getEditor().getWidth(); > 110: spinnerButtonWidth = spinner.getWidth() - spinnerEditorWidth; > 111: spinnerQuarterHeight = spinner.getHeight() / 4; I'm unsure it's valid to get the location on screen right after calling `setVisible(true)` on the frame. The size of the spinner should be valid but the location may be `null`. I suggest calling `getLocationOnScreen()` in another `invokeAndWait` to let the EDT one process the events after making the frame visible on the screen. ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From duke at openjdk.java.net Tue Feb 8 05:48:04 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Tue, 8 Feb 2022 05:48:04 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux In-Reply-To: References: Message-ID: On Fri, 21 Jan 2022 17:02:38 GMT, Maxim Kartashev wrote: > These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: > 1. `makeDefaultConfig()` returning `NULL`. > 2. A race condition when the number of screens changes. > The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. > > The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. > > The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. > > We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. What's preventing me from going down the path of returning some default instead of locking are these two considerations: 1. By returning a default value when the screen number "suddenly" goes out range, the function will essentially lie. And it's going to take quite a while for me to prove that this lie will not have a long-lasting adverse effect. 2. The idea of testing if the fix actually cures the crash suggested by @mrserb will work, but only to prove that one particular hypothesis about the crash is correct. It won't help to prove that the whole process remains in a stable state and continues functioning correctly. But our our users kind of proved that already and I'm very reluctant to replaces what I believe is already working with what will probably work. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From serb at openjdk.java.net Tue Feb 8 05:54:36 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 8 Feb 2022 05:54:36 GMT Subject: RFR: 8281419: The source data for the color conversion can be discarded Message-ID: When we convert the image from one color profile to another one we copy data to the temp array, and after conversion, we commit both(src and dst). But the source array could be discarded since we do not(should not) change it. Tested on windows (fastest result after a few runs). ThreadsMAX is 32 threads. The test is just a "ColorConvertOp.filter()" for the opaque buffered image. ![images](https://user-images.githubusercontent.com/14138494/152925400-cf248f88-e2ba-47ec-8d58-71784026ff8a.png) https://jmh.morethan.io/?gists=541569ac2fe6173d471455d282680fa2,d3b91e1fba067c71fc73a6df8d47773f ------------- Commit messages: - JNI_ABORT Changes: https://git.openjdk.java.net/jdk/pull/7375/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7375&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281419 Stats: 10 lines in 1 file changed: 1 ins; 0 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/7375.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7375/head:pull/7375 PR: https://git.openjdk.java.net/jdk/pull/7375 From mvs at openjdk.java.net Tue Feb 8 07:46:52 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 8 Feb 2022 07:46:52 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v3] In-Reply-To: References: Message-ID: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments: Seperated createUI and JSpinner access in two EDT calls,variables renamed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7363/files - new: https://git.openjdk.java.net/jdk/pull/7363/files/e1213acc..0ad1a2e7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7363&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7363&range=01-02 Stats: 22 lines in 1 file changed: 5 ins; 8 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/7363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7363/head:pull/7363 PR: https://git.openjdk.java.net/jdk/pull/7363 From djelinski at openjdk.java.net Tue Feb 8 10:01:37 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Tue, 8 Feb 2022 10:01:37 GMT Subject: RFR: 8281440: AWT: Conversion from string literal loses const qualifier Message-ID: This patch fixes AWT compilation under VisualStudio 2019 with `/Zc:strictStrings` enabled. Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. ------------- Commit messages: - Compile with strict string handling Changes: https://git.openjdk.java.net/jdk/pull/7379/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7379&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281440 Stats: 22 lines in 10 files changed: 0 ins; 0 del; 22 mod Patch: https://git.openjdk.java.net/jdk/pull/7379.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7379/head:pull/7379 PR: https://git.openjdk.java.net/jdk/pull/7379 From aivanov at openjdk.java.net Tue Feb 8 12:13:04 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 12:13:04 GMT Subject: RFR: 8281296: Create a regression test for JDK-4515999 [v3] In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 07:46:52 GMT, Manukumar V S wrote: >> Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) >> Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments: Seperated createUI and JSpinner access in two EDT calls,variables renamed Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From mvs at openjdk.java.net Tue Feb 8 12:43:15 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 8 Feb 2022 12:43:15 GMT Subject: Integrated: 8281296: Create a regression test for JDK-4515999 In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 08:18:23 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999) > Create a test which checks whether incrementing dates via the keyboard (up/down) gives the same results as when using mouse press on the arrow buttons in a JSpinner. This pull request has now been integrated. Changeset: f5d8cebb Author: Manukumar V S Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/f5d8cebbb6f1b38247c3b30ba8859874a0e98115 Stats: 201 lines in 1 file changed: 201 ins; 0 del; 0 mod 8281296: Create a regression test for JDK-4515999 Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7363 From asemenov at openjdk.java.net Tue Feb 8 13:07:32 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Tue, 8 Feb 2022 13:07:32 GMT Subject: RFR: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working Message-ID: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> The "toggle popup" accessibility action does not correctly match the NSAccessibleShowMenuAction action. The "toggleExpand" accessibility action does not correctly match the NSAccessibilityPressAction action. @forantar @azuev-java please review. ------------- Commit messages: - 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working Changes: https://git.openjdk.java.net/jdk/pull/7381/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7381&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281338 Stats: 184 lines in 2 files changed: 182 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7381.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7381/head:pull/7381 PR: https://git.openjdk.java.net/jdk/pull/7381 From ant at openjdk.java.net Tue Feb 8 13:43:04 2022 From: ant at openjdk.java.net (Anton Tarasov) Date: Tue, 8 Feb 2022 13:43:04 GMT Subject: RFR: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working In-Reply-To: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> References: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> Message-ID: On Tue, 8 Feb 2022 12:57:43 GMT, Artem Semenov wrote: > The "toggle popup" accessibility action does not correctly match the NSAccessibleShowMenuAction action. > The "toggleExpand" accessibility action does not correctly match the NSAccessibilityPressAction action. > > @forantar @azuev-java please review. Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7381 From asemenov at openjdk.java.net Tue Feb 8 14:48:45 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Tue, 8 Feb 2022 14:48:45 GMT Subject: RFR: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working [v2] In-Reply-To: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> References: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> Message-ID: <2g1FAGxxAKa3GVBhFVROWNHRAfMtK-VV3rOsnkYJrFA=.df6261d1-1719-4a83-a78b-463839454e9f@github.com> > The "toggle popup" accessibility action does not correctly match the NSAccessibleShowMenuAction action. > The "toggleExpand" accessibility action does not correctly match the NSAccessibilityPressAction action. > > @forantar @azuev-java please review. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7381/files - new: https://git.openjdk.java.net/jdk/pull/7381/files/1cccf195..99efa23a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7381&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7381&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7381.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7381/head:pull/7381 PR: https://git.openjdk.java.net/jdk/pull/7381 From jdv at openjdk.java.net Tue Feb 8 15:45:05 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 8 Feb 2022 15:45:05 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: <-r8sUU021kSSly6mnX2oLt3HBSWlE--FCO1jB1JYtCI=.e7bfa7b8-11e1-4dcd-b3da-b33d73a92129@github.com> On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan wrote: > If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout. > This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly. I am trying to understand the fix and why we are adding these checks. Looks like this change is similar to https://bugs.openjdk.java.net/browse/JDK-8214578 fix. Also it has history of https://bugs.openjdk.java.net/browse/JDK-8214578 -> https://bugs.openjdk.java.net/browse/JDK-8191178 -> https://bugs.openjdk.java.net/browse/JDK-8068283. Right now going through the history of fixes but check added looks okay to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From prr at openjdk.java.net Tue Feb 8 15:58:03 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 8 Feb 2022 15:58:03 GMT Subject: RFR: 8281440: AWT: Conversion from string literal loses const qualifier In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 09:54:26 GMT, Daniel Jeli?ski wrote: > This patch fixes AWT compilation under VisualStudio 2019 with `/Zc:strictStrings` enabled. > > Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. Marked as reviewed by prr (Reviewer). I assume no problems building with 2017 either ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7379 From prr at openjdk.java.net Tue Feb 8 15:59:11 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 8 Feb 2022 15:59:11 GMT Subject: RFR: 8281419: The source data for the color conversion can be discarded In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 05:42:47 GMT, Sergey Bylokhov wrote: > When we convert the image from one color profile to another one we copy data to the temp array, and after conversion, we commit both(src and dst). But the source array could be discarded since we do not(should not) change it. > > Tested on windows (fastest result after a few runs). ThreadsMAX is 32 threads. The test is just a "ColorConvertOp.filter()" for the opaque buffered image. > > ![images](https://user-images.githubusercontent.com/14138494/152925400-cf248f88-e2ba-47ec-8d58-71784026ff8a.png) > > https://jmh.morethan.io/?gists=541569ac2fe6173d471455d282680fa2,d3b91e1fba067c71fc73a6df8d47773f Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7375 From prr at openjdk.java.net Tue Feb 8 16:09:12 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 8 Feb 2022 16:09:12 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan wrote: > If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout. > This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly. Doesn't it seem odd to you that we need to enumerate some of these cases ? I had to look up what Kotoeri is .. and I suspect it is actually obsolete and we can get rid of it ? But why do one or two cases need special treatment and hundreds of others not ? @naotoj - Naoto do you understand any of this ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From naoto at openjdk.java.net Tue Feb 8 18:09:18 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Tue, 8 Feb 2022 18:09:18 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 16:06:01 GMT, Phil Race wrote: > @naotoj - Naoto do you understand any of this ? No. But the fix seems somewhat ad-hoc to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From prr at openjdk.java.net Tue Feb 8 18:50:09 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 8 Feb 2022 18:50:09 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 18:06:32 GMT, Naoto Sato wrote: > > @naotoj - Naoto do you understand any of this ? > > No. But the fix seems somewhat ad-hoc to me. Exactly. ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From djelinski at openjdk.java.net Tue Feb 8 19:07:02 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Tue, 8 Feb 2022 19:07:02 GMT Subject: RFR: 8281440: AWT: Conversion from string literal loses const qualifier In-Reply-To: References: Message-ID: <2NxlkPcEVV67Nu-l3qy9GJZtOVkc1rqyIHpDH8B17sk=.30c9ac27-5612-49b4-97b6-89c8b3fdfc2f@github.com> On Tue, 8 Feb 2022 09:54:26 GMT, Daniel Jeli?ski wrote: > This patch fixes AWT compilation under VisualStudio 2019 with `/Zc:strictStrings` enabled. > > Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. VS 2017 build also works with these changes, just checked. ------------- PR: https://git.openjdk.java.net/jdk/pull/7379 From aivanov at openjdk.java.net Tue Feb 8 19:32:11 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 19:32:11 GMT Subject: RFR: 8281440: AWT: Conversion from string literal loses const qualifier In-Reply-To: References: Message-ID: <9MCyQ8jS_vIJEaKl9uEoUGsgtlxbkMA0-b4SaqzZRG0=.f0398138-f369-43d2-8f03-883f86e31709@github.com> On Tue, 8 Feb 2022 09:54:26 GMT, Daniel Jeli?ski wrote: > This patch fixes AWT compilation under VisualStudio 2019 with `/Zc:strictStrings` enabled. > > Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7379 From aivanov at openjdk.java.net Tue Feb 8 20:40:16 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 20:40:16 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:29:47 GMT, lawrence.andrews wrote: >> 1) Removed =yesno that was causing the test to fail with following exception >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> After removing =yesno, test was just passing without user interaction so fixed the following >> >> Add the following so that user can user interact with the test >> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. >> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Dispose the frame via EDT The second line with ?This text should be solid black? that's rendered with `VALUE_TEXT_ANTIALIAS_GASP` isn't black for me, it uses gray AA. However, it remains black for `BufferedImage` case. test/jdk/java/awt/Graphics/TextAAHintsTest.java line 2: > 1: package awt; > 2: Usually tests are not part of any package. test/jdk/java/awt/Graphics/TextAAHintsTest.java line 52: > 50: import javax.swing.SwingUtilities; > 51: > 52: public class TextAAHintsTest extends Component { There's an extra space before `extends`. test/jdk/java/awt/Graphics/TextAAHintsTest.java line 177: > 175: 1. Verify that first set of text are rendered correctly. > 176: 2. Second set of text are created using BufferedImage of the first text. > 177: 3. Third set of text are created using VolatileImage of the first text. ?are? ? ?is?: the _set_ is singular. test/jdk/java/awt/Graphics/TextAAHintsTest.java line 180: > 178: """; > 179: TextArea instructionTextArea = new TextArea(instructions, 8, 50); > 180: instructionTextArea.setEnabled(false); Please leave it enabled but make it read-only (`setEditable(false)`). This way the text will be black and easier to read. test/jdk/java/awt/Graphics/TextAAHintsTest.java line 191: > 189: }); > 190: Button failButton = new Button("Fail"); > 191: failButton.addActionListener(e->{ Usually, there are spaces around `->` in lambda expressions. This particular event handler isn't short. I suggest making it a static method or at least moving showing the dialog into a separate method. It'll make the code easier to read. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From aivanov at openjdk.java.net Tue Feb 8 20:47:11 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 20:47:11 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3] In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 20:36:31 GMT, Alexey Ivanov wrote: > The second line with ?This text should be solid black? that's rendered with `VALUE_TEXT_ANTIALIAS_GASP` isn't black for me, it uses gray AA. However, it remains black for `BufferedImage` case. It depends on the **uiScale**. The second "black" remains rendered without antialiasing applied at the scales of 100% and 125%; at the scales of 150% and above, it's rendered with grayscale antialiasing. This should be clarified or dropped from the test. The spec for `VALUE_TEXT_ANTIALIAS_GASP` says that either behaviour is fine and it also depends on the specific font used. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From aivanov at openjdk.java.net Tue Feb 8 20:54:11 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 20:54:11 GMT Subject: RFR: 8281419: The source data for the color conversion can be discarded In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 05:42:47 GMT, Sergey Bylokhov wrote: > When we convert the image from one color profile to another one we copy data to the temp array, and after conversion, we commit both(src and dst). But the source array could be discarded since we do not(should not) change it. > > Tested on windows (fastest result after a few runs). ThreadsMAX is 32 threads. The test is just a "ColorConvertOp.filter()" for the opaque buffered image. > > ![images](https://user-images.githubusercontent.com/14138494/152925400-cf248f88-e2ba-47ec-8d58-71784026ff8a.png) > > https://jmh.morethan.io/?gists=541569ac2fe6173d471455d282680fa2,d3b91e1fba067c71fc73a6df8d47773f Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7375 From prr at openjdk.java.net Tue Feb 8 20:59:14 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 8 Feb 2022 20:59:14 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3] In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 20:43:47 GMT, Alexey Ivanov wrote: > > The second line with ?This text should be solid black? that's rendered with `VALUE_TEXT_ANTIALIAS_GASP` isn't black for me, it uses gray AA. However, it remains black for `BufferedImage` case. > > It depends on the **uiScale**. The second "black" remains rendered without antialiasing applied at the scales of 100% and 125%; at the scales of 150% and above, it's rendered with grayscale antialiasing. > > This should be clarified or dropped from the test. The spec for `VALUE_TEXT_ANTIALIAS_GASP` says that either behaviour is fine and it also depends on the specific font used. Yes, the font has a table (GASP) which says what to do at a specific size. And the font only knows about PIXEL sizes. So it is the number of device pixels which affects this .. so point size you specify multiplied by (UI) scale gives you the size to use to ask the font. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From aivanov at openjdk.java.net Tue Feb 8 20:59:14 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 8 Feb 2022 20:59:14 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v2] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:25:55 GMT, lawrence.andrews wrote: >> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 231: >> >>> 229: } >>> 230: } finally { >>> 231: frame.dispose(); >> >> The frame should be disposed on the EDT. > > Added code to dispose frame with in EDT. It is not necessary: the test uses `awt.Frame`, not `swing.JFrame`. All the UI is created directly on the main thread. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From serb at openjdk.java.net Wed Feb 9 01:30:10 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 9 Feb 2022 01:30:10 GMT Subject: Integrated: 8280132: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder In-Reply-To: References: Message-ID: On Sun, 23 Jan 2022 07:41:39 GMT, Sergey Bylokhov wrote: > In jdk 9 we started to sort the list of methods for each class for two reasons: > 1. We had a number of bugs which state that our JavaBeans randomly does not work, examples: JDK-6807471[1] , JDK-6788525[2], the reason was that the order of methods from Class.getMethods() is not specified. > 2. We tried to sort methods so the more specific returns types come first, this was done because our logic for selecting the correct method did not work properly. > > The second issue above was fixed by the separate change [JDK-8196373](https://bugs.openjdk.java.net/browse/JDK-8196373) so now we only need to sort the list of methods in any order and do not care about return types. This pull request has now been integrated. Changeset: 2f46af05 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/2f46af05ce2d43e19e0095680eb3a52fd904c774 Stats: 1542 lines in 2 files changed: 1513 ins; 14 del; 15 mod 8280132: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7190 From duke at openjdk.java.net Wed Feb 9 01:49:27 2022 From: duke at openjdk.java.net (Martin Desruisseaux) Date: Wed, 9 Feb 2022 01:49:27 GMT Subject: RFR: 8275345: RasterFormatException when drawing a tiled image made of non-writable rasters Message-ID: This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`. https://bugs.openjdk.java.net/browse/JDK-8275345 ------------- Commit messages: - 8275345: RasterFormatException thrown when drawing a tiled image made of non-writable rasters. Changes: https://git.openjdk.java.net/jdk/pull/7337/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7337&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8275345 Stats: 218 lines in 2 files changed: 209 ins; 8 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7337.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7337/head:pull/7337 PR: https://git.openjdk.java.net/jdk/pull/7337 From duke at openjdk.java.net Wed Feb 9 01:49:27 2022 From: duke at openjdk.java.net (TheShermanTanker) Date: Wed, 9 Feb 2022 01:49:27 GMT Subject: RFR: 8275345: RasterFormatException when drawing a tiled image made of non-writable rasters In-Reply-To: References: Message-ID: On Thu, 3 Feb 2022 15:26:40 GMT, Martin Desruisseaux wrote: > This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`. > > https://bugs.openjdk.java.net/browse/JDK-8275345 @desruisseaux You need to rename your PR title to just "8275345" and the title will automatically be renamed to the correct issue (and it will be marked as correctly linked), also you need to sign an agreement here: https://oca.opensource.oracle.com/, then type /signed as a reply to this PR (fair warning, the approval process takes pretty long) ------------- PR: https://git.openjdk.java.net/jdk/pull/7337 From duke at openjdk.java.net Wed Feb 9 01:49:28 2022 From: duke at openjdk.java.net (Martin Desruisseaux) Date: Wed, 9 Feb 2022 01:49:28 GMT Subject: RFR: 8275345: RasterFormatException when drawing a tiled image made of non-writable rasters In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 10:51:04 GMT, TheShermanTanker wrote: >> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`. >> >> https://bugs.openjdk.java.net/browse/JDK-8275345 > > @desruisseaux > You need to rename your PR title to just "8275345" and the title will automatically be renamed to the correct issue (and it will be marked as correctly linked), also you need to sign an agreement here: https://oca.opensource.oracle.com/, then type /signed as a reply to this PR (fair warning, the approval process takes pretty long) Hello @TheShermanTanker , thanks for your help! Just did the PR renaming and it worked. About the OCA, actually we signed it a few years ago. I have already sent an email to `opensource ? at oracle.com` for clarifying. ------------- PR: https://git.openjdk.java.net/jdk/pull/7337 From duke at openjdk.java.net Wed Feb 9 01:49:29 2022 From: duke at openjdk.java.net (TheShermanTanker) Date: Wed, 9 Feb 2022 01:49:29 GMT Subject: RFR: 8275345: RasterFormatException when drawing a tiled image made of non-writable rasters In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 10:51:04 GMT, TheShermanTanker wrote: >> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`. >> >> https://bugs.openjdk.java.net/browse/JDK-8275345 > > @desruisseaux > You need to rename your PR title to just "8275345" and the title will automatically be renamed to the correct issue (and it will be marked as correctly linked), also you need to sign an agreement here: https://oca.opensource.oracle.com/, then type /signed as a reply to this PR (fair warning, the approval process takes pretty long) > Hello @TheShermanTanker , thanks for your help! Just did the PR renaming and it worked. About the OCA, actually we signed it a few years ago. I have already sent an email to `opensource ? at oracle.com` for clarifying. You should be good then, the system should recognize you as an author/contributor after the /covered command if you're part of a group (I'm not sure if emailing them will help though...). All you'd have to wait for afterwards is for the issue to be automatically mailed to the appropriate groups and go from there. Have a great day! ------------- PR: https://git.openjdk.java.net/jdk/pull/7337 From serb at openjdk.java.net Wed Feb 9 03:00:04 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 9 Feb 2022 03:00:04 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux In-Reply-To: References: Message-ID: On Mon, 24 Jan 2022 18:45:50 GMT, Sergey Bylokhov wrote: >> Thanks for looking at this! >> >>> You can try to reproduce the bug by creating the custom JDK and emulating the native upcalls by the test. It will help to prve that the fix will work. >> >> Can you elaborate, please? Do you mean that this custom JDK would synthetically change `X11GraphicsDevice.screen` at the "right" time? >> >>> >>> I am not sure that it is possible to synchronize access to the screen number across the code w/o introducing deadlocks, the current change does not cover all cases where the X11GraphicsDevice.screen is passed around. probably we should follow this [suggestion](https://github.com/openjdk/jdk/blob/6765f902505fbdd02f25b599f942437cd805cad1/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java#L58) and everywhere the "screen" is used under the awt lock (1)check that it is less than the number of screens and use 0(main screen as a fallback), or (2) some "default value" if the number of screens is zero at that time - something similar was implemented on macOS by the [JDK-8211992](http://hg.openjdk.java.net/jdk/jdk/rev/814c49afb1a7) >> >> I agree, returning some default as a fallback should also work. However, that's so radically different from the approach I've taken that a separate PR would be required. > >> Can you elaborate, please? Do you mean that this custom JDK would synthetically change `X11GraphicsDevice.screen` at the "right" time? > > Yes, at the "right" time and the "right" number of monitors. > >> > I am not sure that it is possible to synchronize access to the screen number across the code w/o introducing deadlocks, the current change does not cover all cases where the X11GraphicsDevice.screen is passed around. probably we should follow this [suggestion](https://github.com/openjdk/jdk/blob/6765f902505fbdd02f25b599f942437cd805cad1/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java#L58) and everywhere the "screen" is used under the awt lock (1)check that it is less than the number of screens and use 0(main screen as a fallback), or (2) some "default value" if the number of screens is zero at that time - something similar was implemented on macOS by the [JDK-8211992](http://hg.openjdk.java.net/jdk/jdk/rev/814c49afb1a7) >> >> I agree, returning some default as a fallback should also work. However, that's so radically different from the approach I've taken that a separate PR would be required. > > It is better to start from the bug reproducing. As the change - the awt lock always should be the last one, I am not sure that wrapping a bunch of code by that lock is safe. > 2. The idea of testing if the fix actually cures the crash suggested by @mrserb will work, but only to prove that one particular hypothesis about the crash is correct. Even this confirmation will be useful. > But our our users kind of proved that already and I'm very reluctant to replaces what I believe is already working with what will probably work. * If we will go this way then we will need to synchronize all access to the "screen" field of the X11GraphicsDevice by the awt lock. The current fix does not cover the case when the screen field is leaked outside the class via X11GraphicsDevice.getScreen() method. Can that "external code" also crash? * We probably should remove the "X11GraphicsDevice.configLock" lock from the X11GraphicsDevice and use awt lock instead. * The code in the XCanvasPeer most probably can be rewritten w/o using the screenNum, by the iteration over the newDev.getConfigurations() and check the visual of each config. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From kizune at openjdk.java.net Wed Feb 9 03:44:04 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 9 Feb 2022 03:44:04 GMT Subject: RFR: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working [v2] In-Reply-To: <2g1FAGxxAKa3GVBhFVROWNHRAfMtK-VV3rOsnkYJrFA=.df6261d1-1719-4a83-a78b-463839454e9f@github.com> References: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> <2g1FAGxxAKa3GVBhFVROWNHRAfMtK-VV3rOsnkYJrFA=.df6261d1-1719-4a83-a78b-463839454e9f@github.com> Message-ID: On Tue, 8 Feb 2022 14:48:45 GMT, Artem Semenov wrote: >> The "toggle popup" accessibility action does not correctly match the NSAccessibleShowMenuAction action. >> The "toggleExpand" accessibility action does not correctly match the NSAccessibilityPressAction action. >> >> @forantar @azuev-java please review. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7381 From psadhukhan at openjdk.java.net Wed Feb 9 04:40:08 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 9 Feb 2022 04:40:08 GMT Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?= symbol when using Finnish layout In-Reply-To: References: Message-ID: <8a0mByF6ZMHVaI94-nb4ghK7wYXjXqGamhMcq0fPXm0=.fe668cf8-dd17-4e5c-b82a-1d0f3082624c@github.com> On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan wrote: > If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout. > This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly. It might seem ad-hoc but the InputMethod event design in mac is such that (which has been there from beginning of macport days) that we need to fix in this way as far I can tell (it has been fixed like this earlier also without any regression). The https://github.com/openjdk/jdk/blame/master/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m#L946 statement seems to suggest that as well, in my opinion, to send Input method event if we get such insertText "out of the blue!" ------------- PR: https://git.openjdk.java.net/jdk/pull/7262 From psadhukhan at openjdk.java.net Wed Feb 9 05:51:29 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 9 Feb 2022 05:51:29 GMT Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT orientation, arrow keys behaves opposite traversing through keyboard Message-ID: After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard. Fixed to reverse the direction traversal for RTL orientation. ------------- Commit messages: - RTL Fix - RTL Fix - RTL Fix Changes: https://git.openjdk.java.net/jdk/pull/7396/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7396&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277369 Stats: 168 lines in 2 files changed: 167 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7396.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7396/head:pull/7396 PR: https://git.openjdk.java.net/jdk/pull/7396 From asemenov at openjdk.java.net Wed Feb 9 06:54:14 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 9 Feb 2022 06:54:14 GMT Subject: Integrated: 8281338 NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working In-Reply-To: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> References: <2urZRPbdSR_VTLhpSpbi44nWwaN7GkB8JXO0DcTtNhM=.284f14ec-6b8f-436a-9a90-dff611edae6e@github.com> Message-ID: On Tue, 8 Feb 2022 12:57:43 GMT, Artem Semenov wrote: > The "toggle popup" accessibility action does not correctly match the NSAccessibleShowMenuAction action. > The "toggleExpand" accessibility action does not correctly match the NSAccessibilityPressAction action. > > @forantar @azuev-java please review. This pull request has now been integrated. Changeset: cb2f8cae Author: Artem Semenov URL: https://git.openjdk.java.net/jdk/commit/cb2f8caed2de1bf0a85a7ebfd232c36371e06c98 Stats: 185 lines in 2 files changed: 183 ins; 0 del; 2 mod 8281338: NSAccessibilityPressAction action for tree node and NSAccessibilityShowMenuAcgtion action not working Reviewed-by: ant, kizune ------------- PR: https://git.openjdk.java.net/jdk/pull/7381 From djelinski at openjdk.java.net Wed Feb 9 07:52:25 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 9 Feb 2022 07:52:25 GMT Subject: RFR: 8281523: Accessibility: Conversion from string literal loses const qualifier Message-ID: This patch fixes jdk.accessibility compilation under VisualStudio 2019 with /Zc:strictStrings enabled. Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. ------------- Commit messages: - Remove dead code - Strict string handling Changes: https://git.openjdk.java.net/jdk/pull/7380/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7380&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281523 Stats: 46 lines in 9 files changed: 0 ins; 28 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/7380.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7380/head:pull/7380 PR: https://git.openjdk.java.net/jdk/pull/7380 From djelinski at openjdk.java.net Wed Feb 9 08:39:07 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 9 Feb 2022 08:39:07 GMT Subject: Integrated: 8281440: AWT: Conversion from string literal loses const qualifier In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 09:54:26 GMT, Daniel Jeli?ski wrote: > This patch fixes AWT compilation under VisualStudio 2019 with `/Zc:strictStrings` enabled. > > Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well. This pull request has now been integrated. Changeset: f924e50c Author: Daniel Jeli?ski Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/f924e50c42c2f9548d2983449a98c45af40b0d35 Stats: 22 lines in 10 files changed: 0 ins; 0 del; 22 mod 8281440: AWT: Conversion from string literal loses const qualifier Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7379 From aivanov at openjdk.java.net Wed Feb 9 08:56:05 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 9 Feb 2022 08:56:05 GMT Subject: RFR: 8202836 : [macosx] test java/awt/Graphics/TextAAHintsTest.java fails [v3] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:29:47 GMT, lawrence.andrews wrote: >> 1) Removed =yesno that was causing the test to fail with following exception >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> After removing =yesno, test was just passing without user interaction so fixed the following >> >> Add the following so that user can user interact with the test >> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected. >> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Dispose the frame via EDT test/jdk/java/awt/Graphics/TextAAHintsTest.java line 228: > 226: mainThread = Thread.currentThread(); > 227: try { > 228: mainThread.sleep(testTimeOut); Suggestion: Thread.sleep(testTimeOut); `sleep` is a static method, it's better to call it via the class name rather than an instance variable. This will resolve the IDE warning. ------------- PR: https://git.openjdk.java.net/jdk/pull/7275 From mvs at openjdk.java.net Wed Feb 9 15:07:36 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 9 Feb 2022 15:07:36 GMT Subject: RFR: 8281535: Create a regression test for JDK-4670051 Message-ID: Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there. I have updated the testing details in the comment section of JDK-8281535. ------------- Commit messages: - 8281535: Create a regression test for JDK-4670051 Changes: https://git.openjdk.java.net/jdk/pull/7404/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7404&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281535 Stats: 302 lines in 1 file changed: 302 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7404.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7404/head:pull/7404 PR: https://git.openjdk.java.net/jdk/pull/7404 From mvs at openjdk.java.net Wed Feb 9 15:07:36 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 9 Feb 2022 15:07:36 GMT Subject: RFR: 8281535: Create a regression test for JDK-4670051 In-Reply-To: References: Message-ID: On Wed, 9 Feb 2022 14:58:10 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there. > I have updated the testing details in the comment section of JDK-8281535. @aivanov-jdk Can you please review this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7404 From dmarkov at openjdk.java.net Wed Feb 9 17:57:32 2022 From: dmarkov at openjdk.java.net (Dmitry Markov) Date: Wed, 9 Feb 2022 17:57:32 GMT Subject: RFR: 8281555: [macos] Get rid of deprecated Style Masks constants Message-ID: The Style Masks constants [1], which are utilised by AWT, were deprecated starting from macOS 10.12 Sierra. It is high time to replace them with new constants introduced by NSWindowStyleMask enumeration [2]. [1] - https://developer.apple.com/documentation/appkit/nspanel/style_masks [2] - https://developer.apple.com/documentation/appkit/nswindowstylemask ------------- Commit messages: - 8281555: [macos] Get rid of deprecated Style Masks constants Changes: https://git.openjdk.java.net/jdk/pull/7408/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7408&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281555 Stats: 22 lines in 5 files changed: 0 ins; 0 del; 22 mod Patch: https://git.openjdk.java.net/jdk/pull/7408.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7408/head:pull/7408 PR: https://git.openjdk.java.net/jdk/pull/7408 From aivanov at openjdk.java.net Wed Feb 9 19:16:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 9 Feb 2022 19:16:13 GMT Subject: Integrated: 8280820: Clean up bug8033699 and bug8075609.java tests: regtesthelpers aren't used In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:38:36 GMT, Alexey Ivanov wrote: > Removed references to `regtesthelpers` libarary which isn't used. > Organised imports and replaced anonymous classes with lambda expressions. > > Put `waitForIdle` before the test execution starts and moved the frame to the centre of the screen. > > The CI with the updated tests is green. This pull request has now been integrated. Changeset: fd8a3dcc Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/fd8a3dcc52dc5d6b62edd83eacef5934f6294e80 Stats: 75 lines in 2 files changed: 14 ins; 13 del; 48 mod 8280820: Clean up bug8033699 and bug8075609.java tests: regtesthelpers aren't used Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7322 From philip.race at oracle.com Wed Feb 9 20:06:42 2022 From: philip.race at oracle.com (Philip Race) Date: Wed, 9 Feb 2022 12:06:42 -0800 Subject: CFV: New Client Libraries Group Member : Alexey Ivanov (aivanov) Message-ID: I hereby nominate Alexey Ivanov (aivanov) to Membership in the Client Libraries Group. Alexey has worked in the client libraries sustaining team at Oracle since 2014 and in that time has contributed 60 client fixes [1], [2]. He has been active on the old client lists, awt-dev [3], swing-dev[4] and 2d-dev [5] mailing list over that time, as well as on client-libs-dev [6]. He is also a JDK committer and reviewer [7]. Votes are due by 1pm PST Wednesday 23rd February 2022 //Only current Members of the Client Libraries Group [8] are eligible to vote on this nomination. || Votes must be cast in the open by replying to this mailing list. For Lazy Consensus voting instructions, see [9]. -phil. [1] git log --author aivanov --format='%h %s' [2] https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Alexey+Ivanov%22&type=commits [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev [7] https://openjdk.java.net/census#aivanov [8] https://openjdk.java.net/census#client-libs [9] http://openjdk.java.net/groups/#member-vote From philip.race at oracle.com Wed Feb 9 20:06:47 2022 From: philip.race at oracle.com (Philip Race) Date: Wed, 9 Feb 2022 12:06:47 -0800 Subject: CFV: New Client Libraries Group Member : Dmitry Markov (dmarkov) Message-ID: I hereby nominate Dmitry Markov (dmarkov) to Membership in the Client Libraries Group. Dmitry has worked in the client libraries sustaining team at Oracle since 2013 and in that time has contributed 61 client fixes [1], [2]. He has been active on the old client lists, awt-dev [3], swing-dev[4] and 2d-dev [5] mailing list over that time, as well as on client-libs-dev [6]. He is also a JDK committer and reviewer [7]. Votes are due by 1pm PST Wednesday 23rd February 2022 //Only current Members of the Client Libraries Group [8] are eligible to vote on this nomination. || Votes must be cast in the open by replying to this mailing list. For Lazy Consensus voting instructions, see [9]. -phil. [1] git log --author dmarkov --format='%h %s' [2] https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Dmitry+Markov%22&type=commits [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev [7] https://openjdk.java.net/census#dmarkov [8] https://openjdk.java.net/census#client-libs [9] http://openjdk.java.net/groups/#member-vote From philip.race at oracle.com Wed Feb 9 20:07:23 2022 From: philip.race at oracle.com (Philip Race) Date: Wed, 9 Feb 2022 12:07:23 -0800 Subject: CFV: New Client Libraries Group Member : Alexey Ivanov (aivanov) In-Reply-To: References: Message-ID: <50e0a634-b826-a203-9055-1359c307ff8d@oracle.com> Vote: yes -phil. From philip.race at oracle.com Wed Feb 9 20:07:38 2022 From: philip.race at oracle.com (Philip Race) Date: Wed, 9 Feb 2022 12:07:38 -0800 Subject: CFV: New Client Libraries Group Member : Dmitry Markov (dmarkov) In-Reply-To: References: Message-ID: <9413529a-4e19-2c27-bb2a-2e1a9cc01497@oracle.com> Vote: yes -phil. From prr at openjdk.java.net Wed Feb 9 20:56:30 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 9 Feb 2022 20:56:30 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS [v2] In-Reply-To: References: Message-ID: <2l7zaaCbzYUMan0EGkiNwt5pWWCViTjqqyKBZdXUfdI=.f60d40fa-85b9-4cf4-8cdf-220952d46a6d@github.com> On Tue, 1 Feb 2022 08:15:53 GMT, Sergey Bylokhov wrote: >> In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. >> >> It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. >> >> Solution is to allocate the storage of the proper size 1 * scale * 1 * scale > > Sergey Bylokhov 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 three additional commits since the last revision: > > - the new check > - Merge branch 'master' into JDK-8274939 > - Initial fix JDK-8274939 Sorry, missed this update. ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5864 From aivanov at openjdk.java.net Wed Feb 9 21:39:25 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 9 Feb 2022 21:39:25 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS [v2] In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 08:15:53 GMT, Sergey Bylokhov wrote: >> In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. >> >> It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. >> >> Solution is to allocate the storage of the proper size 1 * scale * 1 * scale > > Sergey Bylokhov 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 three additional commits since the last revision: > > - the new check > - Merge branch 'master' into JDK-8274939 > - Initial fix JDK-8274939 Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5864 From prr at openjdk.java.net Thu Feb 10 00:53:11 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 10 Feb 2022 00:53:11 GMT Subject: RFR: 8275345: RasterFormatException when drawing a tiled image made of non-writable rasters In-Reply-To: References: Message-ID: <43I3pRgJUbsthgHPq8VURjVkdc0dTnzI0ojNoxxrLS0=.70edda2b-b91e-43c5-a78a-2b7735f083cb@github.com> On Thu, 3 Feb 2022 15:26:40 GMT, Martin Desruisseaux wrote: > This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`. > > https://bugs.openjdk.java.net/browse/JDK-8275345 Changes requested by prr (Reviewer). test/jdk/java/awt/image/DrawImage/TiledImage.java line 1: > 1: import java.awt.Graphics2D; The fix itself looks good but the test needs work. It needs the GPLv2 - like all the other tests, and is missing the jtreg tags which allow the test harness to identify it as a test. and a few orher tags. Again take a look at other tests. Note that since you don't create any windows you will NOT need the @headful tag. test/jdk/java/awt/image/DrawImage/TiledImage.java line 26: > 24: * > 25: *
> 26:  * Exception in thread "main" java.awt.image.RasterFormatException: (parentX + width) is outside raster

No point in HTML here ... nothing runs on this javadoc.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From prasanta.sadhukhan at oracle.com  Thu Feb 10 04:17:50 2022
From: prasanta.sadhukhan at oracle.com (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 09:47:50 +0530
Subject: CFV: New Client Libraries Group Member : Alexey Ivanov (aivanov)
In-Reply-To: 
References: 
Message-ID: <94193836-dbf3-2790-1fd5-004248458a05@oracle.com>

Vote: yes

Regards
Prasanta
On 10-Feb-22 1:36 AM, Philip Race wrote:
> I hereby nominate Alexey Ivanov (aivanov) to Membership in the Client 
> Libraries Group.
>
> Alexey has worked in the client libraries sustaining team at Oracle 
> since 2014 and in that time
> has contributed 60 client fixes [1], [2].
> He has been active on the old client lists, awt-dev [3], swing-dev[4] 
> and 2d-dev [5] mailing list over that time,
> as well as on client-libs-dev [6]. He is also a JDK committer and 
> reviewer [7].
>
> Votes are due by 1pm PST Wednesday 23rd February 2022
>
> //Only current Members of the Client Libraries Group [8] are eligible 
> to vote on this nomination. ||
> Votes must be cast in the open by replying to this mailing list.
>
> For Lazy Consensus voting instructions, see [9].
>
> -phil.
>
>
> [1] git log --author aivanov --format='%h %s'
> [2] 
> https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Alexey+Ivanov%22&type=commits
> [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev
> [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev
> [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev
> [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev
> [7] https://openjdk.java.net/census#aivanov
> [8] https://openjdk.java.net/census#client-libs
> [9] http://openjdk.java.net/groups/#member-vote 
> 


From prasanta.sadhukhan at oracle.com  Thu Feb 10 04:18:24 2022
From: prasanta.sadhukhan at oracle.com (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 09:48:24 +0530
Subject: CFV: New Client Libraries Group Member : Dmitry Markov (dmarkov)
In-Reply-To: 
References: 
Message-ID: <096b248d-4759-e0fe-bf3f-cb793d587bba@oracle.com>

Vote: yes

Regards
Prasanta
On 10-Feb-22 1:36 AM, Philip Race wrote:
> I hereby nominate Dmitry Markov (dmarkov) to Membership in the Client 
> Libraries Group.
>
> Dmitry has worked in the client libraries sustaining team at Oracle 
> since 2013 and in that time
> has contributed 61 client fixes [1], [2].
> He has been active on the old client lists, awt-dev [3], swing-dev[4] 
> and 2d-dev [5] mailing list over that time,
> as well as on client-libs-dev [6]. He is also a JDK committer and 
> reviewer [7].
>
> Votes are due by 1pm PST Wednesday 23rd February 2022
>
> //Only current Members of the Client Libraries Group [8] are eligible 
> to vote on this nomination. ||
> Votes must be cast in the open by replying to this mailing list.
>
> For Lazy Consensus voting instructions, see [9].
>
> -phil.
>
>
> [1] git log --author dmarkov --format='%h %s'
> [2] 
> https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Dmitry+Markov%22&type=commits
> [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev
> [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev
> [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev
> [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev
> [7] https://openjdk.java.net/census#dmarkov
> [8] https://openjdk.java.net/census#client-libs
> [9] http://openjdk.java.net/groups/#member-vote 
> 


From psadhukhan at openjdk.java.net  Thu Feb 10 04:40:34 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 04:40:34 GMT
Subject: RFR: 8054449: Incompatible type in example code in TreePath
Message-ID: 

The example code in TreePath throws
error: incompatible types: Object cannot be converted to DefaultMutableTreeNode
           getUserObject();
Fixed the example code

-------------

Commit messages:
 - 8054449: Incompatible type in example code in TreePath

Changes: https://git.openjdk.java.net/jdk/pull/7414/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7414&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8054449
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7414.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7414/head:pull/7414

PR: https://git.openjdk.java.net/jdk/pull/7414


From alitvinov at openjdk.java.net  Thu Feb 10 05:05:37 2022
From: alitvinov at openjdk.java.net (Anton Litvinov)
Date: Thu, 10 Feb 2022 05:05:37 GMT
Subject: RFR: 8277922: Unable to click JCheckBox in JTable through Java Access
 Bridge
Message-ID: <68JPxsadS5K_WkQgEkMdD_qCt1DWBpBVHV23b0oQKGU=.0b4e520a-205d-4cf1-b506-dd48616ebece@github.com>

Hello,

Could you please review the following fix for the bug. The bug consists in the fact that When an assistive technology software by means of Java Access Bridge API executes "AccessibleAction" "click" on "AccessibleContext" which corresponds to "javax.swing.JTable" cell containing "javax.swing.JCheckBox", then the cell's value and cell's view represented by "JCheckBox" stay unchanged. The issue is a bug in JDK and should be fixed in JDK, because JDK informs the assistive technology software through Java Access Bridge API in particular through the function

"BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActions *actions)"

that "AccessibleContext" of the table cell with "JCheckBox" supports one action "click", while real execution of this action on this accessible context does not lead to any result.

THE ROOT CAUSE OF THE BUG:

The reason of the issue is the fact that when the assistive technology software tries to do "AccessibleAction" on "AccessibleContext" associated with a cell with boolean data type in "JTable" component through Java Access Bridge (JAB), the JDK executes this "AccessibleAction" on "AccessibleContext" of a renderer, which is an instance of the class "javax.swing.JTable.BooleanRenderer" which is a derivative of "JCheckBox" class, and the instance of this renderer is single and common for all cells of boolean data type. Therefore execution of "click" "AccessibleAction" on this renderer component which is not permanently bound to any particular cell in the table does not lead to update of the table cell value.

THE FIX:

The fix implements an approach which guarantees setting of new values to the table's cells with boolean data type on each execution of "AccessibleAction" of "javax.swing.JTable.BooleanRenderer" instance, when execution of this action changes the "selected" state of this "BooleanRenderer" JCheckBox component.

Please take into account that the created automatic regression test simulates the issue only with Java Accessibility API what is not fully equal to the original test scenario which requires the assistive technology software and usage of Java Access Bridge API and which can be tested using the manual test case attached to the issue in JBS. However the regression test still allows to reproduce the issue and verify that the fix resolves it.

Thank you,
Anton

-------------

Commit messages:
 - 8277922: Unable to click JCheckBox in JTable through Java Access Bridge

Changes: https://git.openjdk.java.net/jdk/pull/7416/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7416&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277922
  Stats: 264 lines in 2 files changed: 263 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7416.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7416/head:pull/7416

PR: https://git.openjdk.java.net/jdk/pull/7416


From duke at openjdk.java.net  Thu Feb 10 05:36:40 2022
From: duke at openjdk.java.net (lawrence.andrews)
Date: Thu, 10 Feb 2022 05:36:40 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v4]
In-Reply-To: 
References: 
Message-ID: <30iOzkwefS6EJE8VLj9-NJ7oysi9WLq3cAOvPug4Wn8=.37f381a6-455a-42d9-982b-84cc1d290722@github.com>

> 1) Removed =yesno that was causing the test to fail with following exception
> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
> After removing =yesno, test was just passing without user interaction so fixed the following
> 
> Add the following so that user can user interact with the test
> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
> 
> @shurymury

lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:

  Removed RenderingHints.VALUE_TEXT_ANTIALIAS_GASP and fixed the review comments

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7275/files
  - new: https://git.openjdk.java.net/jdk/pull/7275/files/5b667fa6..f42940cd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=02-03

  Stats: 84 lines in 1 file changed: 25 ins; 36 del; 23 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7275.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7275/head:pull/7275

PR: https://git.openjdk.java.net/jdk/pull/7275


From duke at openjdk.java.net  Thu Feb 10 05:36:46 2022
From: duke at openjdk.java.net (lawrence.andrews)
Date: Thu, 10 Feb 2022 05:36:46 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v3]
In-Reply-To: 
References: 
 
 
Message-ID: 

On Tue, 8 Feb 2022 19:59:57 GMT, Alexey Ivanov  wrote:

>> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Dispose the frame via EDT
>
> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 2:
> 
>> 1: package awt;
>> 2: 
> 
> Usually tests are not part of any package.

removed package

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 52:
> 
>> 50: import javax.swing.SwingUtilities;
>> 51: 
>> 52: public class TextAAHintsTest  extends Component {
> 
> There's an extra space before `extends`.

Fixed

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 177:
> 
>> 175:                 1. Verify that first set of text are rendered correctly.
>> 176:                 2. Second set of text are created using BufferedImage of the first text.
>> 177:                 3. Third set of text are created using VolatileImage of the first text.
> 
> ?are? ? ?is?: the _set_ is singular.

Corrected

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 180:
> 
>> 178:                 """;
>> 179:         TextArea instructionTextArea = new TextArea(instructions, 8, 50);
>> 180:         instructionTextArea.setEnabled(false);
> 
> Please leave it enabled but make it read-only (`setEditable(false)`). This way the text will be black and easier to read.

Done

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 191:
> 
>> 189:         });
>> 190:         Button failButton = new Button("Fail");
>> 191:         failButton.addActionListener(e->{
> 
> Usually, there are spaces around `->` in lambda expressions.
> 
> This particular event handler isn't short. I suggest making it a static method or at least moving showing the dialog into a separate method. It'll make the code easier to read.

Fixed

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 228:
> 
>> 226:         mainThread = Thread.currentThread();
>> 227:         try {
>> 228:             mainThread.sleep(testTimeOut);
> 
> Suggestion:
> 
>             Thread.sleep(testTimeOut);
> 
> `sleep` is a static method, it's better to call it via the class name rather than an instance variable. This will resolve the IDE warning.

Replaced Thread with CountDownLatch

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From psadhukhan at openjdk.java.net  Thu Feb 10 06:34:07 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 06:34:07 GMT
Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?=
 symbol when using Finnish layout
In-Reply-To: 
References: 
Message-ID: <6FCyOiQWf9f1OJb7E7ebu5Sjhr2oEmjblT8aJdo8FGU=.a0d52947-fb0d-40f9-a36c-3019cb5049d6@github.com>

On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan  wrote:

> If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout.
> This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly.

@dmarkov20 @alitvinv Since you have touched this file and fixed similar issue earlier, can you please review?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7262


From bourges.laurent at gmail.com  Thu Feb 10 06:50:38 2022
From: bourges.laurent at gmail.com (=?UTF-8?Q?Laurent_Bourg=C3=A8s?=)
Date: Thu, 10 Feb 2022 07:50:38 +0100
Subject: CFV: New Client Libraries Group Member : Alexey Ivanov (aivanov)
In-Reply-To: 
References: 
Message-ID: 

Vote: yes

Laurent

Le mer. 9 f?vr. 2022, 21:07, Philip Race  a ?crit :

> I hereby nominate Alexey Ivanov (aivanov) to Membership in the Client
> Libraries Group.
>
> Alexey has worked in the client libraries sustaining team at Oracle
> since 2014 and in that time
> has contributed 60 client fixes [1], [2].
> He has been active on the old client lists, awt-dev [3], swing-dev[4]
> and 2d-dev [5] mailing list over that time,
> as well as on client-libs-dev [6]. He is also a JDK committer and
> reviewer [7].
>
> Votes are due by 1pm PST Wednesday 23rd February 2022
>
> //Only current Members of the Client Libraries Group [8] are eligible to
> vote on this nomination. ||
> Votes must be cast in the open by replying to this mailing list.
>
> For Lazy Consensus voting instructions, see [9].
>
> -phil.
>
>
> [1] git log --author aivanov --format='%h %s'
> [2]
>
> https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Alexey+Ivanov%22&type=commits
> [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev
> [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev
> [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev
> [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev
> [7] https://openjdk.java.net/census#aivanov
> [8] https://openjdk.java.net/census#client-libs
> [9] http://openjdk.java.net/groups/#member-vote
> 
>


From myano at openjdk.java.net  Thu Feb 10 07:42:09 2022
From: myano at openjdk.java.net (Masanori Yano)
Date: Thu, 10 Feb 2022 07:42:09 GMT
Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at
 initial drawing [v2]
In-Reply-To: <_lT1ihu773QLjjWmUOI5XYg0-j1xFrqz8WZSNJ56auc=.b9be5bda-0d47-450b-9523-e4fac6bbf243@github.com>
References: 
 
 <_lT1ihu773QLjjWmUOI5XYg0-j1xFrqz8WZSNJ56auc=.b9be5bda-0d47-450b-9523-e4fac6bbf243@github.com>
Message-ID: 

On Sun, 6 Feb 2022 21:46:37 GMT, Phil Race  wrote:

>> Masanori Yano has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8275715: D3D pipeline processes multiple PaintEvent at initial drawing
>
> The problem I have with this is that this being in createGraphics() isn't obviously relevant to me.
> The repaintPeerTarget() is called only if the surface is lost which means it needs repainting.
> Or does surface lost here perhaps mean "surface has not yet been created", because we aren't
> yet showing the window contents at all and we really should wait for the first paint event ?

@prrace createGraphics() is called to create surface during "the first paint event" processing. And validate() posts new PaintEvent with repaintPeerTarget() when creates surface.

Current stack trace is here:

  [1] java.awt.event.PaintEvent. (PaintEvent.java:106)
  [2] sun.awt.PaintEventDispatcher.createPaintEvent (PaintEventDispatcher.java:80)
  [3] sun.awt.windows.WComponentPeer.postPaintIfNecessary (WComponentPeer.java:892)
  [4] sun.awt.windows.WComponentPeer.handlePaint (WComponentPeer.java:886)
  [5] sun.java2d.d3d.D3DScreenUpdateManager.repaintPeerTarget (D3DScreenUpdateManager.java:283)
  [6] sun.java2d.d3d.D3DScreenUpdateManager.validate (D3DScreenUpdateManager.java:492)
  [7] sun.java2d.d3d.D3DScreenUpdateManager.createGraphics (D3DScreenUpdateManager.java:260)
  [8] sun.awt.windows.WComponentPeer.getGraphics (WComponentPeer.java:646)
  [9] java.awt.Component.getGraphics (Component.java:3,128)
  [10] sun.awt.RepaintArea.paint (RepaintArea.java:227)
  [11] sun.awt.windows.WComponentPeer.handleEvent (WComponentPeer.java:371)
  [12] java.awt.Component.dispatchEventImpl (Component.java:5,056)
  [13] java.awt.Container.dispatchEventImpl (Container.java:2,325)
  [14] java.awt.Window.dispatchEventImpl (Window.java:2,775)
  [15] java.awt.Component.dispatchEvent (Component.java:4,827)
  [16] java.awt.EventQueue.dispatchEventImpl (EventQueue.java:772)

Created surface is normally handled in this processing PaintEvent, so I think there is no need to call repaintPeerTarget(). Also ScreenUpdateManager class which is used for GDI rendering (and parent class of D3DScreenUpdateManager) does not post new PaintEvent at createGraphics(). This validate() is called from createGraphics(), so I hope to reduce to create another PaintEvent at this route only.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6064


From alexey.ushakov at jetbrains.com  Thu Feb 10 07:59:13 2022
From: alexey.ushakov at jetbrains.com (Alexey Ushakov)
Date: Thu, 10 Feb 2022 08:59:13 +0100
Subject: CFV: New Client Libraries Group Member : Alexey Ivanov (aivanov)
In-Reply-To: 
References: 
Message-ID: 

Vote: Yes

> On 9 Feb 2022, at 21:06, Philip Race  wrote:
> 
> I hereby nominate Alexey Ivanov (aivanov) to Membership in the Client Libraries Group.
> 
> Alexey has worked in the client libraries sustaining team at Oracle since 2014 and in that time
> has contributed 60 client fixes [1], [2].
> He has been active on the old client lists, awt-dev [3], swing-dev[4] and 2d-dev [5] mailing list over that time,
> as well as on client-libs-dev [6]. He is also a JDK committer and reviewer [7].
> 
> Votes are due by 1pm PST Wednesday 23rd February 2022
> 
> //Only current Members of the Client Libraries Group [8] are eligible to vote on this nomination. ||
> Votes must be cast in the open by replying to this mailing list.
> 
> For Lazy Consensus voting instructions, see [9].
> 
> -phil.
> 
> 
> [1] git log --author aivanov --format='%h %s'
> [2] https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Alexey+Ivanov%22&type=commits
> [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev
> [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev
> [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev
> [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev
> [7] https://openjdk.java.net/census#aivanov
> [8] https://openjdk.java.net/census#client-libs
> [9] http://openjdk.java.net/groups/#member-vote 



From alexey.ushakov at jetbrains.com  Thu Feb 10 08:08:13 2022
From: alexey.ushakov at jetbrains.com (Alexey Ushakov)
Date: Thu, 10 Feb 2022 09:08:13 +0100
Subject: CFV: New Client Libraries Group Member : Dmitry Markov (dmarkov)
In-Reply-To: 
References: 
Message-ID: 

Vote: yes

> On 9 Feb 2022, at 21:06, Philip Race  wrote:
> 
> I hereby nominate Dmitry Markov (dmarkov) to Membership in the Client Libraries Group.
> 
> Dmitry has worked in the client libraries sustaining team at Oracle since 2013 and in that time
> has contributed 61 client fixes [1], [2].
> He has been active on the old client lists, awt-dev [3], swing-dev[4] and 2d-dev [5] mailing list over that time,
> as well as on client-libs-dev [6]. He is also a JDK committer and reviewer [7].
> 
> Votes are due by 1pm PST Wednesday 23rd February 2022
> 
> //Only current Members of the Client Libraries Group [8] are eligible to vote on this nomination. ||
> Votes must be cast in the open by replying to this mailing list.
> 
> For Lazy Consensus voting instructions, see [9].
> 
> -phil.
> 
> 
> [1] git log --author dmarkov --format='%h %s'
> [2] https://github.com/openjdk/jdk/search?p=2&q=author-name%3A%22Dmitry+Markov%22&type=commits
> [3] https://mail.openjdk.java.net/mailman/listinfo/awt-dev
> [4] https://mail.openjdk.java.net/mailman/listinfo/swing-dev
> [5] https://mail.openjdk.java.net/mailman/listinfo/2d-dev
> [6] https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev
> [7] https://openjdk.java.net/census#dmarkov
> [8] https://openjdk.java.net/census#client-libs
> [9] http://openjdk.java.net/groups/#member-vote 



From psadhukhan at openjdk.java.net  Thu Feb 10 08:17:29 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 08:17:29 GMT
Subject: RFR: 8047749: javadoc for getPathBounds() in TreeUI and BasicTreeUI is
 incorrect
Message-ID: 

The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
The getPathBounds() in BasicTreeUI returns null if tree or treeState is null. 
Fixed the javadoc.

-------------

Commit messages:
 - 8047749: javadoc for getPathBounds() in TreeUI and BasicTreeUI is incorrect

Changes: https://git.openjdk.java.net/jdk/pull/7421/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7421&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8047749
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7421.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7421/head:pull/7421

PR: https://git.openjdk.java.net/jdk/pull/7421


From aivanov at openjdk.java.net  Thu Feb 10 09:10:06 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Thu, 10 Feb 2022 09:10:06 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v4]
In-Reply-To: <30iOzkwefS6EJE8VLj9-NJ7oysi9WLq3cAOvPug4Wn8=.37f381a6-455a-42d9-982b-84cc1d290722@github.com>
References: 
 <30iOzkwefS6EJE8VLj9-NJ7oysi9WLq3cAOvPug4Wn8=.37f381a6-455a-42d9-982b-84cc1d290722@github.com>
Message-ID: 

On Thu, 10 Feb 2022 05:36:40 GMT, lawrence.andrews  wrote:

>> 1) Removed =yesno that was causing the test to fail with following exception
>> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
>> After removing =yesno, test was just passing without user interaction so fixed the following
>> 
>> Add the following so that user can user interact with the test
>> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
>> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
>> 
>> @shurymury
>
> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed RenderingHints.VALUE_TEXT_ANTIALIAS_GASP and fixed the review comments

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/Graphics/TextAAHintsTest.java line 2:

> 1: /*
> 2:  * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved.

Suggestion:

 * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.

One more comma.

test/jdk/java/awt/Graphics/TextAAHintsTest.java line 59:

> 57:     public static final CountDownLatch countDownLatch = new CountDownLatch(1);
> 58:     private static Frame frame;
> 59:     public static String failureReason;

`failureReason` should also be `volatile`.

All the fields can be `private`. You access them from this class only; nested classes, including the static ones, have access to private members of the surrounding class.

test/jdk/java/awt/Graphics/TextAAHintsTest.java line 199:

> 197:     }
> 198: 
> 199:     public static void readFailedReason() {

`readFailureReason` or `getFailureReason`?

test/jdk/java/awt/Graphics/TextAAHintsTest.java line 221:

> 219: 
> 220:     public static void main(String[] args) throws InterruptedException, InvocationTargetException {
> 221:         java.awt.EventQueue.invokeAndWait(TextAAHintsTest::createTestUI);

I wonder why `EventQueue` uses fully qualified class name instead of being imported as other classes. That's fine, I'm just wondering.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From aivanov at openjdk.java.net  Thu Feb 10 09:10:07 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Thu, 10 Feb 2022 09:10:07 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v3]
In-Reply-To: 
References: 
 
 
 
Message-ID: 

On Thu, 10 Feb 2022 05:31:58 GMT, lawrence.andrews  wrote:

>> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 177:
>> 
>>> 175:                 1. Verify that first set of text are rendered correctly.
>>> 176:                 2. Second set of text are created using BufferedImage of the first text.
>>> 177:                 3. Third set of text are created using VolatileImage of the first text.
>> 
>> ?are? ? ?is?: the _set_ is singular.
>
> Corrected

I can't see it. The instructions aren't modified.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From aivanov at openjdk.java.net  Thu Feb 10 09:28:02 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Thu, 10 Feb 2022 09:28:02 GMT
Subject: RFR: 8054449: Incompatible type in example code in TreePath
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 04:33:50 GMT, Prasanta Sadhukhan  wrote:

> The example code in TreePath throws
> error: incompatible types: Object cannot be converted to DefaultMutableTreeNode
>            getUserObject();
> Fixed the example code

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7414


From duke at openjdk.java.net  Thu Feb 10 10:22:43 2022
From: duke at openjdk.java.net (Martin Desruisseaux)
Date: Thu, 10 Feb 2022 10:22:43 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v2]
In-Reply-To: 
References: 
Message-ID: 

> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`.
> 
> https://bugs.openjdk.java.net/browse/JDK-8275345

Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:

  Add jtreg @test, @bug and @summary tags. Remove HTML 
 tags. Edit comments.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7337/files
  - new: https://git.openjdk.java.net/jdk/pull/7337/files/c3db2978..fea2f9c0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7337&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7337&range=00-01

  Stats: 33 lines in 1 file changed: 27 ins; 3 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7337.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7337/head:pull/7337

PR: https://git.openjdk.java.net/jdk/pull/7337


From dmarkov at openjdk.java.net  Thu Feb 10 10:46:10 2022
From: dmarkov at openjdk.java.net (Dmitry Markov)
Date: Thu, 10 Feb 2022 10:46:10 GMT
Subject: RFR: 8054449: Incompatible type in example code in TreePath
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 04:33:50 GMT, Prasanta Sadhukhan  wrote:

> The example code in TreePath throws
> error: incompatible types: Object cannot be converted to DefaultMutableTreeNode
>            getUserObject();
> Fixed the example code

Marked as reviewed by dmarkov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7414


From psadhukhan at openjdk.java.net  Thu Feb 10 12:06:09 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Thu, 10 Feb 2022 12:06:09 GMT
Subject: Integrated: 8054449: Incompatible type in example code in TreePath
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 04:33:50 GMT, Prasanta Sadhukhan  wrote:

> The example code in TreePath throws
> error: incompatible types: Object cannot be converted to DefaultMutableTreeNode
>            getUserObject();
> Fixed the example code

This pull request has now been integrated.

Changeset: 039313d6
Author:    Prasanta Sadhukhan 
URL:       https://git.openjdk.java.net/jdk/commit/039313d65d47dc85cb8c91d3e1d2752d365f70f9
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8054449: Incompatible type in example code in TreePath

Reviewed-by: aivanov, dmarkov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7414


From duke at openjdk.java.net  Thu Feb 10 12:48:04 2022
From: duke at openjdk.java.net (Nikita Provotorov)
Date: Thu, 10 Feb 2022 12:48:04 GMT
Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?=
 symbol when using Finnish layout
In-Reply-To: 
References: 
Message-ID: 

On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan  wrote:

> If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout.
> This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly.

Hey, folks! With my environment the patch fixes only the `?` + `s` combination, but does nothing with all other broken keys, i.e. all except `e`, `u`, `i`, `o`, `a`.

Can you please verify you are reproducing this behavior too?

My environment:
* macOS 11.6.1;
* Xcode 13.2.1;
* Boot JDK 17.0.1 (for building);
* Finnish layout for testing.

Reproducer:

package com.company;

import javax.swing.*;
import java.awt.event.InputMethodEvent;
import java.awt.event.InputMethodListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.text.AttributedCharacterIterator;

public class KeyboardWindow {
    final JFrame frame;
    final JTextArea textArea;

    KeyboardWindow() {
        frame = new JFrame();
        frame.setSize(300, 200);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setTitle("Keyboard Window");

        textArea = new JTextArea();

        textArea.addKeyListener(new KeyAdapter() {
            @Override
            public void keyTyped(KeyEvent e) {
                //System.out.println("keyTyped 0x" + Integer.toHexString(e.getKeyChar()) + ": " + e + "\n");
            }

            @Override
            public void keyPressed(KeyEvent e) {
                //System.out.println("keyPressed: " + e + "\n");
            }

            @Override
            public void keyReleased(KeyEvent e) {
                //System.out.println("keyReleased: " + e + "\n");
            }
        });

        textArea.addInputMethodListener(new InputMethodListener() {
            @Override
            public void inputMethodTextChanged(InputMethodEvent event) {
                //System.out.println("inputMethodTextChanged: " + event + "\n");
            }

            @Override
            public void caretPositionChanged(InputMethodEvent event) {
                //System.out.println("caretPositionChanged: " + event + "\n");
            }
        });

        frame.add(textArea);

        frame.pack();
        frame.setSize(300, 300);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(KeyboardWindow::new);
    }
}

-------------

PR: https://git.openjdk.java.net/jdk/pull/7262


From aivanov at openjdk.java.net  Thu Feb 10 14:06:03 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Thu, 10 Feb 2022 14:06:03 GMT
Subject: RFR: 8047749: javadoc for getPathBounds() in TreeUI and
 BasicTreeUI is incorrect
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 08:11:04 GMT, Prasanta Sadhukhan  wrote:

> The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
> The getPathBounds() in BasicTreeUI returns null if tree or treeState is null. 
> Fixed the javadoc.

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7421


From duke at openjdk.java.net  Thu Feb 10 14:15:25 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Thu, 10 Feb 2022 14:15:25 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling above
 100%
Message-ID: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>

The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.

The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 

A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.

This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.

The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.

The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

-------------

Commit messages:
 - 8280861: Robot color picker broken on Linux with scaling above 100%

Changes: https://git.openjdk.java.net/jdk/pull/7425/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280861
  Stats: 121 lines in 8 files changed: 91 ins; 3 del; 27 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7425.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7425/head:pull/7425

PR: https://git.openjdk.java.net/jdk/pull/7425


From dmarkov at openjdk.java.net  Thu Feb 10 15:43:10 2022
From: dmarkov at openjdk.java.net (Dmitry Markov)
Date: Thu, 10 Feb 2022 15:43:10 GMT
Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?=
 symbol when using Finnish layout
In-Reply-To: 
References: 
Message-ID: 

On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan  wrote:

> If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout.
> This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly.

It seems we fail to detect accented symbols at least for ?Finish? keyboard layout (other layouts might be affected too). 
I would expect that the function `keyDown()` will set `fProcessingKeystroke` flag to `NO` and then `insertText()` will do the rest but it does not work and requires investigation.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7262


From serb at openjdk.java.net  Thu Feb 10 18:08:07 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Thu, 10 Feb 2022 18:08:07 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
Message-ID: 

On Thu, 10 Feb 2022 14:08:48 GMT, Maxim Kartashev  wrote:

> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
> 
> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
> 
> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
> 
> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
> 
> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
> 
> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2874:

> 2872: }
> 2873: 
> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,

Don't we need to do the same for the gtk2? I suggest to update one of the test below to cover gtk_robot on/off for both gtk2/gtk3.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From duke at openjdk.java.net  Thu Feb 10 18:20:05 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Thu, 10 Feb 2022 18:20:05 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
Message-ID: 

On Thu, 10 Feb 2022 18:04:37 GMT, Sergey Bylokhov  wrote:

>> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
>> 
>> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
>> 
>> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
>> 
>> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
>> 
>> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
>> 
>> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.
>
> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2874:
> 
>> 2872: }
>> 2873: 
>> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,
> 
> Don't we need to do the same for the gtk2? I suggest to update one of the test below to cover gtk_robot on/off for both gtk2/gtk3.

Maybe not as the previous fix was mode for gtk3 only, but I can double-check. Do you know if MATE desktop environment  is a good candidate for finding gtk2 or are there easier options on Ubuntu?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From serb at openjdk.java.net  Thu Feb 10 18:25:02 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Thu, 10 Feb 2022 18:25:02 GMT
Subject: RFR: 8277922: Unable to click JCheckBox in JTable through Java
 Access Bridge
In-Reply-To: <68JPxsadS5K_WkQgEkMdD_qCt1DWBpBVHV23b0oQKGU=.0b4e520a-205d-4cf1-b506-dd48616ebece@github.com>
References: <68JPxsadS5K_WkQgEkMdD_qCt1DWBpBVHV23b0oQKGU=.0b4e520a-205d-4cf1-b506-dd48616ebece@github.com>
Message-ID: 

On Thu, 10 Feb 2022 04:59:33 GMT, Anton Litvinov  wrote:

> Hello,
> 
> Could you please review the following fix for the bug. The bug consists in the fact that When an assistive technology software by means of Java Access Bridge API executes "AccessibleAction" "click" on "AccessibleContext" which corresponds to "javax.swing.JTable" cell containing "javax.swing.JCheckBox", then the cell's value and cell's view represented by "JCheckBox" stay unchanged. The issue is a bug in JDK and should be fixed in JDK, because JDK informs the assistive technology software through Java Access Bridge API in particular through the function
> 
> "BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActions *actions)"
> 
> that "AccessibleContext" of the table cell with "JCheckBox" supports one action "click", while real execution of this action on this accessible context does not lead to any result.
> 
> THE ROOT CAUSE OF THE BUG:
> 
> The reason of the issue is the fact that when the assistive technology software tries to do "AccessibleAction" on "AccessibleContext" associated with a cell with boolean data type in "JTable" component through Java Access Bridge (JAB), the JDK executes this "AccessibleAction" on "AccessibleContext" of a renderer, which is an instance of the class "javax.swing.JTable.BooleanRenderer" which is a derivative of "JCheckBox" class, and the instance of this renderer is single and common for all cells of boolean data type. Therefore execution of "click" "AccessibleAction" on this renderer component which is not permanently bound to any particular cell in the table does not lead to update of the table cell value.
> 
> THE FIX:
> 
> The fix implements an approach which guarantees setting of new values to the table's cells with boolean data type on each execution of "AccessibleAction" of "javax.swing.JTable.BooleanRenderer" instance, when execution of this action changes the "selected" state of this "BooleanRenderer" JCheckBox component.
> 
> Please take into account that the created automatic regression test simulates the issue only with Java Accessibility API what is not fully equal to the original test scenario which requires the assistive technology software and usage of Java Access Bridge API and which can be tested using the manual test case attached to the issue in JBS. However the regression test still allows to reproduce the issue and verify that the fix resolves it.
> 
> Thank you,
> Anton

src/java.desktop/share/classes/javax/swing/JTable.java line 5493:

> 5491:         }
> 5492: 
> 5493:         protected class AccessibleBooleanRenderer

I guess the doAccessibleAction(i); should work in a similar way as something like "table,getCellJComponent()".click(). Is it actually possible to click on the cell w/o using robot and w/o a11y API just via Swing API and w/o adding code for each type of the renderer?

src/java.desktop/share/classes/javax/swing/JTable.java line 5508:

> 5506:                     (table != null) && table.isEnabled() &&
> 5507:                     table.isCellEditable(row, column)) {
> 5508:                     table.setValueAt(Boolean.valueOf(newSelectedState),

Where this code is triggered if the user click on the checkbox by the mouse?

test/jdk/javax/accessibility/JTable/JCheckBoxInJTableCannotBeClickedTest.java line 92:

> 90: 
> 91:     private void createGUI() {
> 92:         if (!(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)) {

Why the metal L&F is tested, should at least any default L&F works(like Aqua)?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7416


From prr at openjdk.java.net  Thu Feb 10 22:32:08 2022
From: prr at openjdk.java.net (Phil Race)
Date: Thu, 10 Feb 2022 22:32:08 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
Message-ID: 

On Thu, 10 Feb 2022 18:16:29 GMT, Maxim Kartashev  wrote:

>> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2874:
>> 
>>> 2872: }
>>> 2873: 
>>> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,
>> 
>> Don't we need to do the same for the gtk2? I suggest to update one of the test below to cover gtk_robot on/off for both gtk2/gtk3.
>
> Maybe not as the previous fix was mode for gtk3 only, but I can double-check. Do you know if MATE desktop environment  is a good candidate for finding gtk2 or are there easier options on Ubuntu?

I have no idea what MATE is but if you are saying you have a recent Ubuntu and you don't have GTK2, I am at least 95% sure GTK2 is still available from Ubuntu package manager for all current releases.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From duke at openjdk.java.net  Thu Feb 10 22:45:58 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Thu, 10 Feb 2022 22:45:58 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v6]
In-Reply-To: 
References: 
Message-ID: 

> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
> 
> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
> 
> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.

Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:

  Changed test case to use BufferedImage to prevent retina-pixel scaling issues

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7219/files
  - new: https://git.openjdk.java.net/jdk/pull/7219/files/552d4099..52374b86

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=04-05

  Stats: 97 lines in 1 file changed: 31 ins; 48 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7219.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7219/head:pull/7219

PR: https://git.openjdk.java.net/jdk/pull/7219


From serb at openjdk.java.net  Thu Feb 10 23:01:10 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Thu, 10 Feb 2022 23:01:10 GMT
Subject: RFR: 8281555: [macos] Get rid of deprecated Style Masks constants
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 17:50:48 GMT, Dmitry Markov  wrote:

> The Style Masks constants [1], which are utilised by AWT, were deprecated starting from macOS 10.12 Sierra. It is high time to replace them with new constants introduced by NSWindowStyleMask enumeration [2].
> 
> [1] - https://developer.apple.com/documentation/appkit/nspanel/style_masks
> [2] - https://developer.apple.com/documentation/appkit/nswindowstylemask

DId you check that all new constants are work the same way as the old one? For example the doc for the new "[NSWindowStyleMaskUnifiedTitleAndToolbar](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskunifiedtitleandtoolbar)" "said it has no effect".

-------------

PR: https://git.openjdk.java.net/jdk/pull/7408


From serb at openjdk.java.net  Thu Feb 10 23:04:10 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Thu, 10 Feb 2022 23:04:10 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 05:39:52 GMT, Prasanta Sadhukhan  wrote:

> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
> 
> Fixed to reverse the direction traversal for RTL orientation.

test/jdk/javax/swing/JMenuBar/MenuBarRTLBug.java line 70:

> 68:     static volatile boolean passed = false;
> 69: 
> 70:     public static void main(String[] args) throws  Exception {

The submitter said that he use the native L&F should not we check it in the test?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7396


From prr at openjdk.java.net  Thu Feb 10 23:38:09 2022
From: prr at openjdk.java.net (Phil Race)
Date: Thu, 10 Feb 2022 23:38:09 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v2]
In-Reply-To: 
References: 
 
Message-ID: <1cuXpSh6COBJPM5zkFzZUXqPj_a-KE-7zZOnlk5rRwE=.72f96193-37e6-4fad-8c61-953197d2545c@github.com>

On Thu, 10 Feb 2022 10:22:43 GMT, Martin Desruisseaux  wrote:

>> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`.
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8275345
>
> Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add jtreg @test, @bug and @summary tags. Remove HTML 
 tags. Edit comments.

test/jdk/java/awt/image/DrawImage/TiledImage.java line 98:

> 96:  */
> 97: final class TiledImage implements RenderedImage {
> 98:     /**

Still not right. Now you added the tags I ran under jtreg and it errored out.
result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainThread cannot access a member of class TiledImage with modifiers "public static

Basically change "final" to "public" - or at least add public. 

Might be prudent to try this for yourself - and useful for the future.
jtreg instructions for building it can be found here : https://openjdk.java.net/jtreg/build.html
Very possibly there's someone that provides a pre-built binary. There's none on OpenJDK.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From prr at openjdk.java.net  Fri Feb 11 00:04:26 2022
From: prr at openjdk.java.net (Phil Race)
Date: Fri, 11 Feb 2022 00:04:26 GMT
Subject: RFR: 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed
 with ArrayIndexOutOfBoundsException: Array index out of range: -4
Message-ID: 

This test has started failing since we got M1 macs to test on. I don't think we've ever seen this failure elsewhere.
I don't know what it is about that architecture that makes it more likely but I can see how it can happen when multiple threads are using the same instance. 

                    if (newFramePosition >= 0) { 
                        clipBytePosition = newFramePosition * frameSize; 
                        newFramePosition = -1; 
                    } 

newFramePosition is declared volatile which does make it quite possible that after the read and before the use it will have changed.

The fix just synchronizes this block to prevent it.

-------------

Commit messages:
 - 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4

Changes: https://git.openjdk.java.net/jdk/pull/7436/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7436&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269091
  Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7436.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7436/head:pull/7436

PR: https://git.openjdk.java.net/jdk/pull/7436


From duke at openjdk.java.net  Fri Feb 11 01:21:09 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Fri, 11 Feb 2022 01:21:09 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v6]
In-Reply-To: <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com>
References: 
 <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com>
 
 
 <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com>
Message-ID: 

On Mon, 7 Feb 2022 09:06:06 GMT, Prasanta Sadhukhan  wrote:

>> I see it fails for me in mac 10.15..DId you see it pass locally for you and in CI systems? Also, it should show 3 rows including row showing "A""B""C" as it is shown in windows/ubuntu, why it is showing only 1 row here?
>> 
>> Screenshot 2022-02-07 at 2 19 08 PM
>
> I got the 2nd part of the question myself which is because of white gridlines used in AquaLookAndFeel so invisible..

@prsadhuk Ready for review. Changed the test case to paint JFrame to BufferedImage. The test case is marked headful though robot calls are not used, as the JFrame rendering requires it to be headful.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Fri Feb 11 01:55:53 2022
From: duke at openjdk.java.net (lawrence.andrews)
Date: Fri, 11 Feb 2022 01:55:53 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v5]
In-Reply-To: 
References: 
Message-ID: 

> 1) Removed =yesno that was causing the test to fail with following exception
> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
> After removing =yesno, test was just passing without user interaction so fixed the following
> 
> Add the following so that user can user interact with the test
> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
> 
> @shurymury

lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:

  Fixed review comments

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7275/files
  - new: https://git.openjdk.java.net/jdk/pull/7275/files/f42940cd..ea2f6373

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7275&range=03-04

  Stats: 11 lines in 1 file changed: 3 ins; 2 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7275.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7275/head:pull/7275

PR: https://git.openjdk.java.net/jdk/pull/7275


From duke at openjdk.java.net  Fri Feb 11 01:55:56 2022
From: duke at openjdk.java.net (lawrence.andrews)
Date: Fri, 11 Feb 2022 01:55:56 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v4]
In-Reply-To: 
References: 
 <30iOzkwefS6EJE8VLj9-NJ7oysi9WLq3cAOvPug4Wn8=.37f381a6-455a-42d9-982b-84cc1d290722@github.com>
 
Message-ID: 

On Thu, 10 Feb 2022 08:47:51 GMT, Alexey Ivanov  wrote:

>> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removed RenderingHints.VALUE_TEXT_ANTIALIAS_GASP and fixed the review comments
>
> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved.
> 
> Suggestion:
> 
>  * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
> 
> One more comma.

Done

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 59:
> 
>> 57:     public static final CountDownLatch countDownLatch = new CountDownLatch(1);
>> 58:     private static Frame frame;
>> 59:     public static String failureReason;
> 
> `failureReason` should also be `volatile`.
> 
> All the fields can be `private`. You access them from this class only; nested classes, including the static ones, have access to private members of the surrounding class.

Fixed

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 199:
> 
>> 197:     }
>> 198: 
>> 199:     public static void readFailedReason() {
> 
> `readFailureReason` or `getFailureReason`?

Fixed the method name to getFailureReason

> test/jdk/java/awt/Graphics/TextAAHintsTest.java line 221:
> 
>> 219: 
>> 220:     public static void main(String[] args) throws InterruptedException, InvocationTargetException {
>> 221:         java.awt.EventQueue.invokeAndWait(TextAAHintsTest::createTestUI);
> 
> I wonder why `EventQueue` uses fully qualified class name instead of being imported as other classes. That's fine, I'm just wondering.

Fixed

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From serb at openjdk.java.net  Fri Feb 11 05:20:09 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 05:20:09 GMT
Subject: RFR: 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed
 with ArrayIndexOutOfBoundsException: Array index out of range: -4
In-Reply-To: 
References: 
Message-ID: <_E4C4Jtr6DF11jbV8eYj1i5c790Ag-mbeavrXGuE918=.efca4380-6b0e-4247-9348-e8e0c5b7274b@github.com>

On Thu, 10 Feb 2022 23:57:29 GMT, Phil Race  wrote:

> This test has started failing since we got M1 macs to test on. I don't think we've ever seen this failure elsewhere.
> I don't know what it is about that architecture that makes it more likely but I can see how it can happen when multiple threads are using the same instance. 
> 
>                     if (newFramePosition >= 0) { 
>                         clipBytePosition = newFramePosition * frameSize; 
>                         newFramePosition = -1; 
>                     } 
> 
> newFramePosition is declared volatile which does make it quite possible that after the read and before the use it will have changed.
> 
> The fix just synchronizes this block to prevent it.

src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java line 1300:

> 1298:                 }
> 1299:                 while (doIO && thread == curThread) {
> 1300:                     synchronized (this) {

Maybe instead of synchronization we can read it to the local variable,then use, then reset to -1? This class already has many different locks used for synchronization and this one add another one for "this".

-------------

PR: https://git.openjdk.java.net/jdk/pull/7436


From duke at openjdk.java.net  Fri Feb 11 06:18:09 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Fri, 11 Feb 2022 06:18:09 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
 
Message-ID: 

On Thu, 10 Feb 2022 22:28:56 GMT, Phil Race  wrote:

>> Maybe not as the previous fix was mode for gtk3 only, but I can double-check. Do you know if MATE desktop environment  is a good candidate for finding gtk2 or are there easier options on Ubuntu?
>
> I have no idea what MATE is but if you are saying you have a recent Ubuntu and you don't have GTK2, I am at least 95% sure GTK2 is still available from Ubuntu package manager for all current releases.

MATE desktop continues the "traditional" Gnome2 desktop development, so I thought it would be a good test for Gtk2 interfaces. FWIW, I ran the tests on such a system with DPI set to 200 (there's no other way to scale the interface under MATE AFAIK) and they all pass. However, the test executes the same code path as before going by `if (gtk3_version_3_10)` branch.

@prrace 
> GTK2 is still available from Ubuntu package manager for all current releases.

Right, but as long as gtk3 is *also* available, that's what we are going to use as AWT backend, see the code in [gtk_interface.c](https://github.com/openjdk/jdk/blob/eee6a5622dca683d4d6a701daa48e09e8d17b54e/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c#L109).
I hacked around to forbid gtk3 from loading and the tests still passed (this time, without executing my changes).
I think gtk2 has no real notion of scale so the coordinates and size are always in screen pixels. See, for example, the documentation for [gdk_pixbuf_get_from_drawable()](https://www.manpagez.com/html/gdk2/gdk2-2.24.29/gdk2-Pixbufs.php#gdk-pixbuf-get-from-drawable).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From serb at openjdk.java.net  Fri Feb 11 07:13:09 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 07:13:09 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
 
 
Message-ID: 

On Fri, 11 Feb 2022 06:14:27 GMT, Maxim Kartashev  wrote:

>> I have no idea what MATE is but if you are saying you have a recent Ubuntu and you don't have GTK2, I am at least 95% sure GTK2 is still available from Ubuntu package manager for all current releases.
>
> MATE desktop continues the "traditional" Gnome2 desktop development, so I thought it would be a good test for Gtk2 interfaces. FWIW, I ran the tests on such a system with DPI set to 200 (there's no other way to scale the interface under MATE AFAIK) and they all pass. However, the test executes the same code path as before going by `if (gtk3_version_3_10)` branch.
> 
> @prrace 
>> GTK2 is still available from Ubuntu package manager for all current releases.
> 
> Right, but as long as gtk3 is *also* available, that's what we are going to use as AWT backend, see the code in [gtk_interface.c](https://github.com/openjdk/jdk/blob/eee6a5622dca683d4d6a701daa48e09e8d17b54e/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c#L109).
> I hacked around to forbid gtk3 from loading and the tests still passed (this time, without executing my changes).
> I think gtk2 has no real notion of scale so the coordinates and size are always in screen pixels. See, for example, the documentation for [gdk_pixbuf_get_from_drawable()](https://www.manpagez.com/html/gdk2/gdk2-2.24.29/gdk2-Pixbufs.php#gdk-pixbuf-get-from-drawable).

You do not need to hack the code, just add a "jdk.gtk.version" option to enable specific gtk version, this is what I suggested above. to disable the gtk usage in the robot the "awt.robot.gtk" can be used. So you can add that to some test to check that code paths works.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From serb at openjdk.java.net  Fri Feb 11 07:32:12 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 07:32:12 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
Message-ID: 

On Thu, 10 Feb 2022 14:08:48 GMT, Maxim Kartashev  wrote:

> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
> 
> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
> 
> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
> 
> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
> 
> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
> 
> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2876:

> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,
> 2875:      int x, jint y, jint width, jint height, jint jwidth, int dx, int dy,
> 2876:                                                                    jint scale) {

Is this scale parameter is simply ignored? If the passed parameters are always in the device space and the array is allocated properly then we should not care about this scale(especially in case of gtk2)?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From serb at openjdk.java.net  Fri Feb 11 07:45:11 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 07:45:11 GMT
Subject: Integrated: 8281419: The source data for the color conversion can be
 discarded
In-Reply-To: 
References: 
Message-ID: 

On Tue, 8 Feb 2022 05:42:47 GMT, Sergey Bylokhov  wrote:

> When we convert the image from one color profile to another one we copy data to the temp array, and after conversion, we commit both(src and dst). But the source array could be discarded since we do not(should not) change it. 
> 
> Tested on windows (fastest result after a few runs). ThreadsMAX is 32 threads. The test is just a "ColorConvertOp.filter()" for the opaque buffered image.
> 
> ![images](https://user-images.githubusercontent.com/14138494/152925400-cf248f88-e2ba-47ec-8d58-71784026ff8a.png)
> 
> https://jmh.morethan.io/?gists=541569ac2fe6173d471455d282680fa2,d3b91e1fba067c71fc73a6df8d47773f

This pull request has now been integrated.

Changeset: 8441d51e
Author:    Sergey Bylokhov 
URL:       https://git.openjdk.java.net/jdk/commit/8441d51e71e143250b44eea74114a624cf00cc3e
Stats:     10 lines in 1 file changed: 1 ins; 0 del; 9 mod

8281419: The source data for the color conversion can be discarded

Reviewed-by: prr, aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7375


From psadhukhan at openjdk.java.net  Fri Feb 11 08:08:52 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Fri, 11 Feb 2022 08:08:52 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v2]
In-Reply-To: 
References: 
Message-ID: <28F_t6q1Y2OOYS1M_reXGPUSmwy7T4_GugF4oahk554=.df6b69bb-715a-4d42-8987-1bd0ee7863ae@github.com>

> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
> 
> Fixed to reverse the direction traversal for RTL orientation.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Added L&F iteration

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7396/files
  - new: https://git.openjdk.java.net/jdk/pull/7396/files/8afcf220..19b72d40

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7396&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7396&range=00-01

  Stats: 173 lines in 1 file changed: 88 ins; 71 del; 14 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7396.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7396/head:pull/7396

PR: https://git.openjdk.java.net/jdk/pull/7396


From psadhukhan at openjdk.java.net  Fri Feb 11 08:08:53 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Fri, 11 Feb 2022 08:08:53 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v2]
In-Reply-To: 
References: 
 
Message-ID: 

On Thu, 10 Feb 2022 23:00:50 GMT, Sergey Bylokhov  wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added L&F iteration
>
> test/jdk/javax/swing/JMenuBar/MenuBarRTLBug.java line 70:
> 
>> 68:     static volatile boolean passed = false;
>> 69: 
>> 70:     public static void main(String[] args) throws  Exception {
> 
> The submitter said that he use the native L&F should not we check it in the test?

Might as well. Added L&F iteration in the test.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7396


From psadhukhan at openjdk.java.net  Fri Feb 11 08:09:13 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Fri, 11 Feb 2022 08:09:13 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v6]
In-Reply-To: 
References: 
 
Message-ID: 

On Thu, 10 Feb 2022 22:45:58 GMT, Harshitha Onkar  wrote:

>> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
>> 
>> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
>> 
>> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Changed test case to use BufferedImage to prevent retina-pixel scaling issues

test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 33:

> 31:  */
> 32: 
> 33: import java.awt.*;

please expand this wildcard import

test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 90:

> 88:                 String headerColor = Integer.toHexString(table.getTableHeader().getBackground().getRGB());
> 89:                 String pixelColor = tableColor;
> 90:                 boolean isBottomLineVisible = false;

To nitpick, I will much rather use Color instead of converting to String as we are trying to check and compare for Color but it's not a dealbreaker.

test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 93:

> 91: 
> 92:                 // scan table header region to check if bottom border of JTableHeader is visible
> 93:                 for (int y = Y_OFFSET; y <= Y_OFFSET+25; y++) {

Can't we use X_OFFSET for hardcoded 25 here?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Fri Feb 11 08:12:17 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Fri, 11 Feb 2022 08:12:17 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
Message-ID: 

On Fri, 11 Feb 2022 07:28:28 GMT, Sergey Bylokhov  wrote:

> Is this scale parameter is simply ignored?

Looks like it. I can only find one call site of `get_drawable_data()` (in [Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl()](https://github.com/openjdk/jdk/blob/8441d51e71e143250b44eea74114a624cf00cc3e/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c#L336)) and the `scale` parameter is always 1. I think I can drop it from the interface if you prefer.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From psadhukhan at openjdk.java.net  Fri Feb 11 08:13:07 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Fri, 11 Feb 2022 08:13:07 GMT
Subject: RFR: 8241192: [macosx] Wrong letter typed after =?UTF-8?B?wrQ=?=
 symbol when using Finnish layout
In-Reply-To: 
References: 
Message-ID: 

On Fri, 28 Jan 2022 09:38:35 GMT, Prasanta Sadhukhan  wrote:

> If we press " ? " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s" , 2 "?" characters are entered in a text field instead of "?s" with "Finish" keyboard layout.
> This is because, although " ? " is construed as "complex" char and inserted properly the next "s" character is treated as non-complex character as it's utf8Length is 1 and utf16Length is 2, so we need to explicitly make it a "complex" char sequence if the code point is 0x73 ie "s" in Finnish layout for it to be inserted properly.

The usecase in JBS mention about ` ? + s` combination so the fix was done for that..But now that the scope of issue is expanded to consonants too, the fix needs to be expanded too

-------------

PR: https://git.openjdk.java.net/jdk/pull/7262


From duke at openjdk.java.net  Fri Feb 11 09:28:31 2022
From: duke at openjdk.java.net (Tejesh R)
Date: Fri, 11 Feb 2022 09:28:31 GMT
Subject: RFR: 8236907: JTable added to nested panels does not paint last
 visible row
Message-ID: 

Issue in painting last row of JTable due to decrement in `MaxRow `during computation. Differences in `MaxRow `computation between `TablePrintable` and `BasicTableUI `class. The Bug is fixed in both the classes. Test Case added to validate the same.

-------------

Commit messages:
 - 8236907: JTable added to nested panels does not paint last
 - Merge branch 'branch_8236907' of github.com:TejeshR13/jdk into branch_8236907
 - 8236907: JTable added to nested panels does not paint last
 - 8236907: JTable added to nested panels does not paint last
 - 8236907: JTable added to nested panels does not paint last
 - 8236907: JTable added to nested panels does not paint last
 - Merge branch 'master' of github.com:TejeshR13/jdk
 - Initial Commit.

Changes: https://git.openjdk.java.net/jdk/pull/7422/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7422&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8236907
  Stats: 279 lines in 3 files changed: 258 ins; 17 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7422.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7422/head:pull/7422

PR: https://git.openjdk.java.net/jdk/pull/7422


From psadhukhan at openjdk.java.net  Fri Feb 11 09:43:11 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Fri, 11 Feb 2022 09:43:11 GMT
Subject: Integrated: 8047749: javadoc for getPathBounds() in TreeUI and
 BasicTreeUI is incorrect
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 08:11:04 GMT, Prasanta Sadhukhan  wrote:

> The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
> The getPathBounds() in BasicTreeUI returns null if tree or treeState is null. 
> Fixed the javadoc.

This pull request has now been integrated.

Changeset: 4d640760
Author:    Prasanta Sadhukhan 
URL:       https://git.openjdk.java.net/jdk/commit/4d64076058a4ec5df101b06572195ed5fdee6f64
Stats:     2 lines in 2 files changed: 0 ins; 0 del; 2 mod

8047749: javadoc for getPathBounds() in TreeUI and BasicTreeUI is incorrect

Reviewed-by: aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7421


From duke at openjdk.java.net  Fri Feb 11 10:43:11 2022
From: duke at openjdk.java.net (Martin Desruisseaux)
Date: Fri, 11 Feb 2022 10:43:11 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v2]
In-Reply-To: <1cuXpSh6COBJPM5zkFzZUXqPj_a-KE-7zZOnlk5rRwE=.72f96193-37e6-4fad-8c61-953197d2545c@github.com>
References: 
 
 <1cuXpSh6COBJPM5zkFzZUXqPj_a-KE-7zZOnlk5rRwE=.72f96193-37e6-4fad-8c61-953197d2545c@github.com>
Message-ID: 

On Thu, 10 Feb 2022 23:34:58 GMT, Phil Race  wrote:

>> Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add jtreg @test, @bug and @summary tags. Remove HTML 
 tags. Edit comments.
>
> test/jdk/java/awt/image/DrawImage/TiledImage.java line 98:
> 
>> 96:  */
>> 97: final class TiledImage implements RenderedImage {
>> 98:     /**
> 
> Still not right. Now you added the tags I ran under jtreg and it errored out.
> result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainThread cannot access a member of class TiledImage with modifiers "public static
> 
> Basically change "final" to "public" - or at least add public. 
> 
> Might be prudent to try this for yourself - and useful for the future.
> jtreg instructions for building it can be found here : https://openjdk.java.net/jtreg/build.html
> Very possibly there's someone that provides a pre-built binary. There's none on OpenJDK.

Thanks for the tips and your patience. Actually I tried to run jtreg yesterday before to commit the change, but got the following error (I wanted to try on Java 17 first in order to verify that the test failed):


jtreg -jdk:$JAVA_HOME test/jdk/java/awt/image/DrawImage/TiledImage.java


failed to get value for vm.cds.write.archived.java.heap
java.lang.UnsatisfiedLinkError: 'boolean jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive()'
	at jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive(Native Method)
	at requires.VMProps.vmCDSCanWriteArchivedJavaHeap(VMProps.java:413)
	at requires.VMProps$SafeMap.put(VMProps.java:72)
	at requires.VMProps.call(VMProps.java:113)
	at requires.VMProps.call(VMProps.java:60)
	at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)
	at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)

I'm sure I did something wrong with my configuration?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From kizune at openjdk.java.net  Fri Feb 11 10:54:29 2022
From: kizune at openjdk.java.net (Alexander Zuev)
Date: Fri, 11 Feb 2022 10:54:29 GMT
Subject: RFR: 8281033: Improve ImageCheckboxTest to test all available LaF
Message-ID: 

Test modified to perform test on all available LaF's
During test development bug similar to JDK-8216358 was found in Nimbus and GTK+ LaFs
so exceptions were added and separate bugs were created to track these LaFs.

-------------

Commit messages:
 - 8281033: Improve ImageCheckboxTest to test all available LaF

Changes: https://git.openjdk.java.net/jdk/pull/7439/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7439&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8281033
  Stats: 49 lines in 1 file changed: 38 ins; 1 del; 10 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7439.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7439/head:pull/7439

PR: https://git.openjdk.java.net/jdk/pull/7439


From duke at openjdk.java.net  Fri Feb 11 11:22:15 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Fri, 11 Feb 2022 11:22:15 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100%
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
 
 
 
Message-ID: 

On Fri, 11 Feb 2022 07:09:39 GMT, Sergey Bylokhov  wrote:

>> MATE desktop continues the "traditional" Gnome2 desktop development, so I thought it would be a good test for Gtk2 interfaces. FWIW, I ran the tests on such a system with DPI set to 200 (there's no other way to scale the interface under MATE AFAIK) and they all pass. However, the test executes the same code path as before going by `if (gtk3_version_3_10)` branch.
>> 
>> @prrace 
>>> GTK2 is still available from Ubuntu package manager for all current releases.
>> 
>> Right, but as long as gtk3 is *also* available, that's what we are going to use as AWT backend, see the code in [gtk_interface.c](https://github.com/openjdk/jdk/blob/eee6a5622dca683d4d6a701daa48e09e8d17b54e/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.c#L109).
>> I hacked around to forbid gtk3 from loading and the tests still passed (this time, without executing my changes).
>> I think gtk2 has no real notion of scale so the coordinates and size are always in screen pixels. See, for example, the documentation for [gdk_pixbuf_get_from_drawable()](https://www.manpagez.com/html/gdk2/gdk2-2.24.29/gdk2-Pixbufs.php#gdk-pixbuf-get-from-drawable).
>
> You do not need to hack the code, just add a "jdk.gtk.version" option to enable specific gtk version, this is what I suggested above. to disable the gtk usage in the robot the "awt.robot.gtk" can be used. So you can add that to some test to check that code paths works.

Thanks for the pointers, I'll set up a separate test for that.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From aivanov at openjdk.java.net  Fri Feb 11 11:50:13 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 11:50:13 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v5]
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 11 Feb 2022 01:55:53 GMT, lawrence.andrews  wrote:

>> 1) Removed =yesno that was causing the test to fail with following exception
>> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
>> After removing =yesno, test was just passing without user interaction so fixed the following
>> 
>> Add the following so that user can user interact with the test
>> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
>> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
>> 
>> @shurymury
>
> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed review comments

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From aivanov at openjdk.java.net  Fri Feb 11 12:59:18 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 12:59:18 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 14:58:10 GMT, Manukumar V S  wrote:

> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
> I have updated the testing details in the comment section of JDK-8281535.

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 49:

> 47:  * @bug 4670051
> 48:  * @summary Checks whether JSpinner with a SpinnerDateModel
> 49:  * exactly spins the field where cursor is there.

Suggestion:

 * @summary Checks whether JSpinner with a SpinnerDateModel
 *          spins the field where cursor is located.

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 124:

> 122:                 updateSpinnerValue();
> 123:                 // Increment Day
> 124:                 initValue = spinnerValue;

May I suggest modifying `updateSpinnerValue` so that it returns the updated value? I think this code will be clearer:

                initValue = getSpinnerValue();
                // Increment Day

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 184:

> 182:     private static void updateSpinnerValue() throws Exception {
> 183:         SwingUtilities.invokeAndWait(() -> spinnerValue = (Date) spinner.getValue());
> 184:     }

Suggestion:

    private static Date getSpinnerValue() throws Exception {
        SwingUtilities.invokeAndWait(() -> spinnerValue = (Date) spinner.getValue());
        return spinnerValue;
    }

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 214:

> 212:                 (d1.get(Calendar.DAY_OF_YEAR) == d2.get(Calendar.DAY_OF_YEAR)) &&
> 213:                 (d1.get(Calendar.DAY_OF_MONTH) == d2.get(Calendar.DAY_OF_MONTH));
> 214:     }

`DATE` and `DAY_OF_MONTH` return the same value.

Does it make sense to compare `MONTH` and `YEAR`? You never compare that the months or years are equal, the former, however, should be covered by `DAY_OF_YEAR`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From aivanov at openjdk.java.net  Fri Feb 11 13:22:04 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 13:22:04 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 14:58:10 GMT, Manukumar V S  wrote:

> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
> I have updated the testing details in the comment section of JDK-8281535.

Does the new test reproduce the problem reported [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) with 1.4.0 vs 1.4.1?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From duke at openjdk.java.net  Fri Feb 11 14:01:58 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Fri, 11 Feb 2022 14:01:58 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v2]
In-Reply-To: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
Message-ID: <02sN_VHXMu5T9cOtTl0lQQ0HzJ89oqOcf5SZxJ7-5xc=.b31be3e2-5510-4e45-8078-556fde93756c@github.com>

> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
> 
> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
> 
> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
> 
> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
> 
> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
> 
> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

Maxim Kartashev has updated the pull request incrementally with two additional commits since the last revision:

 - Added a separate test with different GTK versions
 - Dropped the 'scale' parameter from gtk*_get_drawable_data() as it was
   effectively unused.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7425/files
  - new: https://git.openjdk.java.net/jdk/pull/7425/files/acb5637d..a00cdc4a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=00-01

  Stats: 168 lines in 6 files changed: 111 ins; 53 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7425.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7425/head:pull/7425

PR: https://git.openjdk.java.net/jdk/pull/7425


From duke at openjdk.java.net  Fri Feb 11 14:05:39 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Fri, 11 Feb 2022 14:05:39 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
Message-ID: 

> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
> 
> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
> 
> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
> 
> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
> 
> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
> 
> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:

  Updated copyright date in TestJProgressBarHighlightColor.java

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7425/files
  - new: https://git.openjdk.java.net/jdk/pull/7425/files/a00cdc4a..fc651add

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=01-02

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

PR: https://git.openjdk.java.net/jdk/pull/7425


From mvs at openjdk.java.net  Fri Feb 11 15:14:51 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Fri, 11 Feb 2022 15:14:51 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051 [v2]
In-Reply-To: 
References: 
Message-ID: 

> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
> I have updated the testing details in the comment section of JDK-8281535.

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Review comments fixed: Updated copyright, formatting changes, changed compareDates(), renamed some variables and methods.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7404/files
  - new: https://git.openjdk.java.net/jdk/pull/7404/files/de5ef09d..887f3158

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7404&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7404&range=00-01

  Stats: 123 lines in 1 file changed: 34 ins; 55 del; 34 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7404.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7404/head:pull/7404

PR: https://git.openjdk.java.net/jdk/pull/7404


From mvs at openjdk.java.net  Fri Feb 11 15:17:11 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Fri, 11 Feb 2022 15:17:11 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 11 Feb 2022 13:19:25 GMT, Alexey Ivanov  wrote:

> Does the new test reproduce the problem reported [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) with 1.4.0 vs 1.4.1?

Yes it was reproducible using JDK 1.4.0 and fixed in JDK 1.7.0 in Solaris Sparcv9 platform, where the bug [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) was originally reported

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From aivanov at openjdk.java.net  Fri Feb 11 15:24:06 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 15:24:06 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051
In-Reply-To: 
References: 
 
 
Message-ID: 

On Fri, 11 Feb 2022 15:14:11 GMT, Manukumar V S  wrote:

> > Does the new test reproduce the problem reported [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) with 1.4.0 vs 1.4.1?
> 
> Yes it was reproducible using JDK 1.4.0 and fixed in JDK 1.7.0 in Solaris Sparcv9 platform, where the bug [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) was originally reported

I think it's incorrect to compare 1.4.0 and 1.7.0 directly. JDK-4670051 was fixed in 1.4.1, according to the records in JBS, so the test should pass in 1.4.1. Since that time, the test should pass in every release.

Anyway it's good to know the test fails in 1.4.0, which means it reproduces the original problem. Thank you for confirming.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From duke at openjdk.java.net  Fri Feb 11 15:37:13 2022
From: duke at openjdk.java.net (lawrence.andrews)
Date: Fri, 11 Feb 2022 15:37:13 GMT
Subject: Integrated: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails
In-Reply-To: 
References: 
Message-ID: 

On Fri, 28 Jan 2022 21:03:48 GMT, lawrence.andrews  wrote:

> 1) Removed =yesno that was causing the test to fail with following exception
> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
> After removing =yesno, test was just passing without user interaction so fixed the following
> 
> Add the following so that user can user interact with the test
> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
> 
> @shurymury

This pull request has now been integrated.

Changeset: f399ae55
Author:    lawrence.andrews 
Committer: Alexey Ivanov 
URL:       https://git.openjdk.java.net/jdk/commit/f399ae558eabdce8960d339ef0758c023aeb89cc
Stats:     115 lines in 1 file changed: 93 ins; 5 del; 17 mod

8202836: [macosx] test java/awt/Graphics/TextAAHintsTest.java fails

Reviewed-by: prr, aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From aivanov at openjdk.java.net  Fri Feb 11 15:37:12 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 15:37:12 GMT
Subject: RFR: 8202836 : [macosx] test
 java/awt/Graphics/TextAAHintsTest.java fails [v5]
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 11 Feb 2022 01:55:53 GMT, lawrence.andrews  wrote:

>> 1) Removed =yesno that was causing the test to fail with following exception
>> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno
>> After removing =yesno, test was just passing without user interaction so fixed the following
>> 
>> Add the following so that user can user interact with the test
>> a) Added pass/fail button and instruction for the user to know what he/she is going to test and what is expected.
>> b) Added Dialog with textarea to enter the reason for the testcase failure. This will help the user to understanding the reason why the test was failed while analyzing the results. 
>> 
>> @shurymury
>
> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed review comments

I have a suggestion which may make the test semi-automatic or at least help the tester to verify.

If the area with the rendered text can be magnified, starting from the first line of text and so on, it would help verify that the text is rendered as expected.

The black text can be verified automatically. The gray and LCD-subpixel may also be automated, yet it requires more work to make the detection stable.

This is out of scope for this issue but it could be another issue. What do you think?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7275


From dmarkov at openjdk.java.net  Fri Feb 11 15:47:11 2022
From: dmarkov at openjdk.java.net (Dmitry Markov)
Date: Fri, 11 Feb 2022 15:47:11 GMT
Subject: RFR: 8281555: [macos] Get rid of deprecated Style Masks constants
In-Reply-To: 
References: 
 
Message-ID: 

On Thu, 10 Feb 2022 22:57:41 GMT, Sergey Bylokhov  wrote:

> DId you check that all new constants are work the same way as the old one? For example the doc for the new "[NSWindowStyleMaskUnifiedTitleAndToolbar](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskunifiedtitleandtoolbar)" "said it has no effect".

I tested it a bit and didn?t notice any changes in the behaviour. The client-libs tests on mach5 are green too.

Actually the replacement of legacy style mask constants is recommended by Apple, see the following section in NSWindow.h file https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.12.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h#L958

As for "[NSWindowStyleMaskUnifiedTitleAndToolbar](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskunifiedtitleandtoolbar)" the full doc statement:
?This constant has no effect, because all windows that include a toolbar use the unified style.? It looks like a feature introduced recently.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7408


From aivanov at openjdk.java.net  Fri Feb 11 15:50:12 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 15:50:12 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051 [v2]
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 11 Feb 2022 15:14:51 GMT, Manukumar V S  wrote:

>> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
>> I have updated the testing details in the comment section of JDK-8281535.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments fixed: Updated copyright, formatting changes, changed compareDates(), renamed some variables and methods.

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 40:

> 38: import javax.swing.SwingUtilities;
> 39: import javax.swing.UIManager;
> 40: import static javax.swing.UIManager.getInstalledLookAndFeels;

Suggestion:

import javax.swing.UIManager;

import static javax.swing.UIManager.getInstalledLookAndFeels;

There should always be a blank between regular imports and static imports.

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 50:

> 48:  * @run main JSpinnerFieldUnderCursorTest
> 49:  */
> 50: public class JSpinnerFieldUnderCursorTest {

Is `DateFieldUnderCursorTest` a more descriptive name name?

test/jdk/javax/swing/JSpinner/4670051/JSpinnerFieldUnderCursorTest.java line 170:

> 168:         return (expected.get(Calendar.DATE) == actual.get(Calendar.DATE)) &&
> 169:                 (expected.get(Calendar.MONTH) == actual.get(Calendar.MONTH)) &&
> 170:                 (expected.get(Calendar.YEAR) == actual.get(Calendar.YEAR));

Suggestion:

        return (expected.get(Calendar.DATE) == actual.get(Calendar.DATE))
               && (expected.get(Calendar.MONTH) == actual.get(Calendar.MONTH))
               && (expected.get(Calendar.YEAR) == actual.get(Calendar.YEAR));

Otherwise, this looks inconsistently to other places where you put the operator on the wrapped line.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From mvs at openjdk.java.net  Fri Feb 11 16:53:53 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Fri, 11 Feb 2022 16:53:53 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051 [v3]
In-Reply-To: 
References: 
Message-ID: 

> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
> I have updated the testing details in the comment section of JDK-8281535.

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Review comments fixed: Renamed file, formatting changes.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7404/files
  - new: https://git.openjdk.java.net/jdk/pull/7404/files/887f3158..1d446b11

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7404&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7404&range=01-02

  Stats: 7 lines in 1 file changed: 1 ins; 0 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7404.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7404/head:pull/7404

PR: https://git.openjdk.java.net/jdk/pull/7404


From aivanov at openjdk.java.net  Fri Feb 11 17:36:20 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Fri, 11 Feb 2022 17:36:20 GMT
Subject: RFR: 8281535: Create a regression test for JDK-4670051 [v3]
In-Reply-To: 
References: 
 
Message-ID: <41PNrbjl10H3tGg8CXvDdfkS34P6w2RDw5JZooGhNoY=.ae5b8b32-30db-46e3-937e-b5c1e428f0c3@github.com>

On Fri, 11 Feb 2022 16:53:53 GMT, Manukumar V S  wrote:

>> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
>> I have updated the testing details in the comment section of JDK-8281535.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments fixed: Renamed file, formatting changes.

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From mvs at openjdk.java.net  Fri Feb 11 17:44:16 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Fri, 11 Feb 2022 17:44:16 GMT
Subject: Integrated: 8281535: Create a regression test for JDK-4670051
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 14:58:10 GMT, Manukumar V S  wrote:

> Create a regression test for [JDK-4670051](https://bugs.openjdk.java.net/browse/JDK-4670051) which checks whether JSpinner with a SpinnerDateModel exactly spins the field where cursor is there.
> I have updated the testing details in the comment section of JDK-8281535.

This pull request has now been integrated.

Changeset: 0786ddb4
Author:    Manukumar V S 
Committer: Alexey Ivanov 
URL:       https://git.openjdk.java.net/jdk/commit/0786ddb4712296c90df2c9e97c76c203a4de4612
Stats:     282 lines in 1 file changed: 282 ins; 0 del; 0 mod

8281535: Create a regression test for JDK-4670051

Reviewed-by: aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7404


From smandalika at openjdk.java.net  Fri Feb 11 17:50:33 2022
From: smandalika at openjdk.java.net (Srinivas Mandalika)
Date: Fri, 11 Feb 2022 17:50:33 GMT
Subject: RFR: 8281569: Create tests for Frame.setMinimumSize() method
Message-ID: 

Create tests for setMinimumSize functionality
Create a test which verifies that on increasing the Frame's minimumSize, it gets reflected in the subsequent getSize call
Create a test which verifies that on frame resizes back to minimumSize on calling pack.

-------------

Commit messages:
 - 8281569: Create tests for Frame.setMinimumSize() method
 - 8281569: Create tests for Frame.setMinimumSize() method

Changes: https://git.openjdk.java.net/jdk/pull/7444/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7444&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8281569
  Stats: 180 lines in 2 files changed: 180 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7444.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7444/head:pull/7444

PR: https://git.openjdk.java.net/jdk/pull/7444


From duke at openjdk.java.net  Fri Feb 11 18:31:56 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Fri, 11 Feb 2022 18:31:56 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v7]
In-Reply-To: 
References: 
Message-ID: <0QOAo2SFeqRgFF9YJQhlYwjvXsJsI48xGrf69E3bJVI=.85d81390-caa8-4721-a737-063fbe4f772d@github.com>

> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
> 
> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
> 
> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.

Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:

  Revised test case - changed string to int comparison, expanded imports

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7219/files
  - new: https://git.openjdk.java.net/jdk/pull/7219/files/52374b86..9d1bc7aa

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=06
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7219&range=05-06

  Stats: 11 lines in 1 file changed: 3 ins; 0 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7219.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7219/head:pull/7219

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Fri Feb 11 18:56:11 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Fri, 11 Feb 2022 18:56:11 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v6]
In-Reply-To: 
References: 
 
 
Message-ID: 

On Fri, 11 Feb 2022 07:30:28 GMT, Prasanta Sadhukhan  wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Changed test case to use BufferedImage to prevent retina-pixel scaling issues
>
> test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 90:
> 
>> 88:                 String headerColor = Integer.toHexString(table.getTableHeader().getBackground().getRGB());
>> 89:                 String pixelColor = tableColor;
>> 90:                 boolean isBottomLineVisible = false;
> 
> To nitpick, I will much rather use Color instead of converting to String as we are trying to check and compare for Color but it's not a dealbreaker.

@prsadhuk  BufferedImage's getRGB() method returns a int value and does not have equivalent method that returns a Color object (at specified coordinates), I was able to change string comparisons to int. Please let me know if this should be okay?

> test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 93:
> 
>> 91: 
>> 92:                 // scan table header region to check if bottom border of JTableHeader is visible
>> 93:                 for (int y = Y_OFFSET; y <= Y_OFFSET+25; y++) {
> 
> Can't we use X_OFFSET for hardcoded 25 here?

The X_OFFSET is different from the 25 specified in the loop, this specifies the vertical scan range. To avoid confusion I have changed it as Y_OFFSET_START and Y_OFFSET_END.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Fri Feb 11 19:27:39 2022
From: duke at openjdk.java.net (DamonGuy)
Date: Fri, 11 Feb 2022 19:27:39 GMT
Subject: RFR: 8012675: Updated Parser class doc to include info regarding lack
 of support for html script tags.
Message-ID: 

Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc.

-------------

Commit messages:
 - Updated Parser class doc to include info regarding lack of support for html script tags.

Changes: https://git.openjdk.java.net/jdk/pull/7446/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8012675
  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7446.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7446/head:pull/7446

PR: https://git.openjdk.java.net/jdk/pull/7446


From serb at openjdk.java.net  Fri Feb 11 21:12:03 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 21:12:03 GMT
Subject: RFR: 8012675: Javadoc for
 javax.swing.text.html.parser.Parser.handleComment() needs to be updated
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 19:20:16 GMT, DamonGuy  wrote:

> Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc.

Don't we need to have the bug somewhere that this tag is not supported? Is it the only tag that is unsupported?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7446


From serb at openjdk.java.net  Fri Feb 11 21:14:02 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 21:14:02 GMT
Subject: RFR: 8281033: Improve ImageCheckboxTest to test all available LaF
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 10:47:41 GMT, Alexander Zuev  wrote:

> Test modified to perform test on all available LaF's
> During test development bug similar to JDK-8216358 was found in Nimbus and GTK+ LaFs
> so exceptions were added and separate bugs were created to track these LaFs.

Marked as reviewed by serb (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7439


From serb at openjdk.java.net  Fri Feb 11 21:17:10 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Fri, 11 Feb 2022 21:17:10 GMT
Subject: RFR: 8281555: [macos] Get rid of deprecated Style Masks constants
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 17:50:48 GMT, Dmitry Markov  wrote:

> The Style Masks constants [1], which are utilised by AWT, were deprecated starting from macOS 10.12 Sierra. It is high time to replace them with new constants introduced by NSWindowStyleMask enumeration [2].
> 
> [1] - https://developer.apple.com/documentation/appkit/nspanel/style_masks
> [2] - https://developer.apple.com/documentation/appkit/nswindowstylemask

Marked as reviewed by serb (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7408


From prr at openjdk.java.net  Fri Feb 11 23:15:06 2022
From: prr at openjdk.java.net (Phil Race)
Date: Fri, 11 Feb 2022 23:15:06 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v2]
In-Reply-To: 
References: 
 
 <1cuXpSh6COBJPM5zkFzZUXqPj_a-KE-7zZOnlk5rRwE=.72f96193-37e6-4fad-8c61-953197d2545c@github.com>
 
Message-ID: <6pSr7-g5iqKws3PBQB3br1qCq1XZrRlxxWuZMT58VdY=.db052109-00d6-4b84-bc6b-5e697da4ad50@github.com>

On Fri, 11 Feb 2022 10:40:20 GMT, Martin Desruisseaux  wrote:

>> test/jdk/java/awt/image/DrawImage/TiledImage.java line 98:
>> 
>>> 96:  */
>>> 97: final class TiledImage implements RenderedImage {
>>> 98:     /**
>> 
>> Still not right. Now you added the tags I ran under jtreg and it errored out.
>> result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainThread cannot access a member of class TiledImage with modifiers "public static
>> 
>> Basically change "final" to "public" - or at least add public. 
>> 
>> Might be prudent to try this for yourself - and useful for the future.
>> jtreg instructions for building it can be found here : https://openjdk.java.net/jtreg/build.html
>> Very possibly there's someone that provides a pre-built binary. There's none on OpenJDK.
>
> Thanks for the tips and your patience. Actually I tried to run jtreg yesterday before to commit the change, but got the following error (I wanted to try on Java 17 first in order to verify that the test failed):
> 
> 
> jtreg -jdk:$JAVA_HOME test/jdk/java/awt/image/DrawImage/TiledImage.java
> 
> 
> failed to get value for vm.cds.write.archived.java.heap
> java.lang.UnsatisfiedLinkError: 'boolean jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive()'
> 	at jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive(Native Method)
> 	at requires.VMProps.vmCDSCanWriteArchivedJavaHeap(VMProps.java:413)
> 	at requires.VMProps$SafeMap.put(VMProps.java:72)
> 	at requires.VMProps.call(VMProps.java:113)
> 	at requires.VMProps.call(VMProps.java:60)
> 	at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)
> 	at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)
> 
> I'm sure I did something wrong with my configuration?

Alas, I'm purely a user as far as jtreg goes. I've had odd looking errors myself and in those cases the eventual answer was often that I was running the wrong (too old) version of jtreg.
I hunt jtreg down from an internal build archive so I can't point you at what I use (nor provide it) but all the external contributors must have some favoured place to get their copy. I just don't know what it is. the code-tools list might be able to help.

But if you want to expedite this, just make the one change - I already tested it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From prr at openjdk.java.net  Fri Feb 11 23:28:43 2022
From: prr at openjdk.java.net (Phil Race)
Date: Fri, 11 Feb 2022 23:28:43 GMT
Subject: RFR: 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed
 with ArrayIndexOutOfBoundsException: Array index out of range: -4 [v2]
In-Reply-To: 
References: 
Message-ID: 

> This test has started failing since we got M1 macs to test on. I don't think we've ever seen this failure elsewhere.
> I don't know what it is about that architecture that makes it more likely but I can see how it can happen when multiple threads are using the same instance. 
> 
>                     if (newFramePosition >= 0) { 
>                         clipBytePosition = newFramePosition * frameSize; 
>                         newFramePosition = -1; 
>                     } 
> 
> newFramePosition is declared volatile which does make it quite possible that after the read and before the use it will have changed.
> 
> The fix just synchronizes this block to prevent it.

Phil Race has updated the pull request incrementally with one additional commit since the last revision:

  8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7436/files
  - new: https://git.openjdk.java.net/jdk/pull/7436/files/141be4e7..3700e1db

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7436&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7436&range=00-01

  Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7436.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7436/head:pull/7436

PR: https://git.openjdk.java.net/jdk/pull/7436


From prr at openjdk.java.net  Fri Feb 11 23:28:45 2022
From: prr at openjdk.java.net (Phil Race)
Date: Fri, 11 Feb 2022 23:28:45 GMT
Subject: RFR: 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed
 with ArrayIndexOutOfBoundsException: Array index out of range: -4 [v2]
In-Reply-To: <_E4C4Jtr6DF11jbV8eYj1i5c790Ag-mbeavrXGuE918=.efca4380-6b0e-4247-9348-e8e0c5b7274b@github.com>
References: 
 <_E4C4Jtr6DF11jbV8eYj1i5c790Ag-mbeavrXGuE918=.efca4380-6b0e-4247-9348-e8e0c5b7274b@github.com>
Message-ID: 

On Fri, 11 Feb 2022 05:17:17 GMT, Sergey Bylokhov  wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4
>
> src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java line 1300:
> 
>> 1298:                 }
>> 1299:                 while (doIO && thread == curThread) {
>> 1300:                     synchronized (this) {
> 
> Maybe instead of synchronization we can read it to the local variable,then use, then reset to -1? This class already has many different locks used for synchronization and this one add another one for "this".

I suppose both should avoid this specific problem. But yes, there's a lot of synchronization in this class.
FIx updated.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7436


From mickleness at gmail.com  Fri Feb 11 23:51:02 2022
From: mickleness at gmail.com (Jeremy Wood)
Date: Fri, 11 Feb 2022 23:51:02 +0000
Subject: Area#add(Area) Optimization
Message-ID: 

I?m working a lot with the Area class lately. Is there any interest in 
the following optimization?

Area#add(Area) currently resembles:

public void add(Area rhs) {
   curves = new AreaOp.AddOp().calculate(this.curves, rhs.curves);
   invalidateBounds();
}

I propose replacing it with:

public void add(Area rhs) {
   if (isEmpty()) {
     curves = rhs.curves;
   } else if (rhs.isEmpty()) {
     return;
   } else {
     curves = new AreaOp.AddOp().calculate(this.curves, rhs.curves);
   }
   invalidateBounds();
}

If either operand is empty then this is effectively a null op. But the 
current implementation may still take several seconds to return 
depending on the complexity of the non-empty operand.

For example the following two snippets of code may have significantly 
different execution times:

Area sum = new Area();
for(Shape shape : incomingShapes) {
   sum.add(new Area(shape));
}

vs

Area sum = new Area(shapes.get(0));
for(int a = 1; a < incomingShapes.size(); a++) {
   Shape shape = incomingShapes.get(a);
   sum.add(new Area(shape));
}

And similarly we could review the other operations 
(subtract/intersect/exclusiveOr/transform) for obvious potential null 
ops.

If I understand openjdk rules correctly: I'm not authorized to submit an 
openJDK ticket. Does this interest anyone else on this list enough to 
submit this as an openJDK ticket? (I'm happy to work on it if I can 
help.)

Regards,
  - Jeremy

From alitvinov at openjdk.java.net  Sat Feb 12 00:56:09 2022
From: alitvinov at openjdk.java.net (Anton Litvinov)
Date: Sat, 12 Feb 2022 00:56:09 GMT
Subject: RFR: 8277922: Unable to click JCheckBox in JTable through Java
 Access Bridge
In-Reply-To: 
References: <68JPxsadS5K_WkQgEkMdD_qCt1DWBpBVHV23b0oQKGU=.0b4e520a-205d-4cf1-b506-dd48616ebece@github.com>
 
Message-ID: 

On Thu, 10 Feb 2022 18:20:40 GMT, Sergey Bylokhov  wrote:

>> Hello,
>> 
>> Could you please review the following fix for the bug. The bug consists in the fact that When an assistive technology software by means of Java Access Bridge API executes "AccessibleAction" "click" on "AccessibleContext" which corresponds to "javax.swing.JTable" cell containing "javax.swing.JCheckBox", then the cell's value and cell's view represented by "JCheckBox" stay unchanged. The issue is a bug in JDK and should be fixed in JDK, because JDK informs the assistive technology software through Java Access Bridge API in particular through the function
>> 
>> "BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActions *actions)"
>> 
>> that "AccessibleContext" of the table cell with "JCheckBox" supports one action "click", while real execution of this action on this accessible context does not lead to any result.
>> 
>> THE ROOT CAUSE OF THE BUG:
>> 
>> The reason of the issue is the fact that when the assistive technology software tries to do "AccessibleAction" on "AccessibleContext" associated with a cell with boolean data type in "JTable" component through Java Access Bridge (JAB), the JDK executes this "AccessibleAction" on "AccessibleContext" of a renderer, which is an instance of the class "javax.swing.JTable.BooleanRenderer" which is a derivative of "JCheckBox" class, and the instance of this renderer is single and common for all cells of boolean data type. Therefore execution of "click" "AccessibleAction" on this renderer component which is not permanently bound to any particular cell in the table does not lead to update of the table cell value.
>> 
>> THE FIX:
>> 
>> The fix implements an approach which guarantees setting of new values to the table's cells with boolean data type on each execution of "AccessibleAction" of "javax.swing.JTable.BooleanRenderer" instance, when execution of this action changes the "selected" state of this "BooleanRenderer" JCheckBox component.
>> 
>> Please take into account that the created automatic regression test simulates the issue only with Java Accessibility API what is not fully equal to the original test scenario which requires the assistive technology software and usage of Java Access Bridge API and which can be tested using the manual test case attached to the issue in JBS. However the regression test still allows to reproduce the issue and verify that the fix resolves it.
>> 
>> Thank you,
>> Anton
>
> src/java.desktop/share/classes/javax/swing/JTable.java line 5493:
> 
>> 5491:         }
>> 5492: 
>> 5493:         protected class AccessibleBooleanRenderer
> 
> I guess the doAccessibleAction(i); should work in a similar way as something like "table,getCellJComponent()".click(). Is it actually possible to click on the cell w/o using robot and w/o a11y API just via Swing API and w/o adding code for each type of the renderer?

I do not see the method "getCellJComponent" in JTable or anything like this, but what I see in the code is, yes, call to the method "doAccessibleAction(0)" of accessible action of accessible context of "JCheckBox" just calls "doClick()" method of "JCheckBox". Yes, sure, "doClick()" is the public method of any "javax.swing.AbstractButton" and can be called from anywhere having a reference to the instance of "javax.swing.AbstractButton".

In the fix I added code to this particular renderer "JTable.BooleanRenderer" in order to be able to intercept every invocation of "boolean doAccessibleAction(int i)" method of its default "AccessibleAction" implementation which is "JCheckBox.AccessibleJCheckBox" and to be able to change a boolean value of a cell in "JTable".

I am not going to add any similar code to other types of default table cell renderers, because first of all there are not many of them: "DefaultTableCellRenderer.UIResource", "NumberRenderer", "DoubleRenderer", "DateRenderer", "IconRenderer", "BooleanRenderer", they are used in the method "JTable.createDefaultRenderers()", and all of these renderers except for "BooleanRenderer" are derivatives of "JLabel" component which reports 0 supported accessible actions, so any default renderer except of "BooleanRenderer" does not support any accessible action. And the problem is that "BooleanRenderer" is derivative of "JCheckBox" and therefore it reports to the user through Java Access Bridge API, through Java Accessibility API that it supports 1 action called "click".

> src/java.desktop/share/classes/javax/swing/JTable.java line 5508:
> 
>> 5506:                     (table != null) && table.isEnabled() &&
>> 5507:                     table.isCellEditable(row, column)) {
>> 5508:                     table.setValueAt(Boolean.valueOf(newSelectedState),
> 
> Where this code is triggered if the user click on the checkbox by the mouse?

Mouse click on JCheckBox is handled differently from execution of "click" accessible action on this JCheckBox, because behind mouse click different AWT mouse events stand which are processed properly, while "doAccessibleAction()" does not involve these mouse events and all their code. So if you are worrying about focus or selection as a result of "doAccessibleAction()", then I checked the behavior of "doAccessibleAction" on JCheckBox, JButton located outside JTable and I confirm that it does not lead to setting of focus to these components, hence there is no need to set focus to this "JCheckBox" "BooleanRenderer" when it is in table cell and no need to change selection in JTable.

I suppose that this code should be invoked only by calling "doAccessibleAction(int)" on object of "AccessibleAction" interface either through Java Accessibility API like it is in this regression test or through Java Access Bridge API from the native assistive software application like it is in the manual test attached to the bug and in that case it is called from the method "private boolean doAccessibleActions(final AccessibleContext ac, final String name)" in the file "src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java".

> test/jdk/javax/accessibility/JTable/JCheckBoxInJTableCannotBeClickedTest.java line 92:
> 
>> 90: 
>> 91:     private void createGUI() {
>> 92:         if (!(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)) {
> 
> Why the metal L&F is tested, should at least any default L&F works(like Aqua)?

Hi Sergey! Thank you for review of this fix, I am glad to hear from you. Metal L&F is not related anyhow to the bug or the tested scenarios, it is not required for the test at all. I used Metal L&F just to make sure that UI of the test will be shown in generic way on all OS families on which it will be run, what will decrease possibility that it may fail because of other unrelated bug connected to some not very well supported L&F. Yes, of course, the test should work with any other L&F including Aqua, but I would like to emphasize that this bug is about MS Windows OS and requires assistive software native application to call "AccessibleAction" of "JTable" cell through Java Access Bridge API. If you insist I can remove this code which sets Metal L&F from the test.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7416


From philip.race at oracle.com  Sat Feb 12 02:15:26 2022
From: philip.race at oracle.com (Philip Race)
Date: Fri, 11 Feb 2022 18:15:26 -0800
Subject: Integrated: 8047749: javadoc for getPathBounds() in TreeUI and
 BasicTreeUI is incorrect
In-Reply-To: 
References: 
 
Message-ID: 

This should have had a CSR.
Valid -> Invalid is fixing a typo for sure but a very significant one in 
the context.

Please retroactively submit the CSR.

-phil.

On 2/11/22 1:43 AM, Prasanta Sadhukhan wrote:
> On Thu, 10 Feb 2022 08:11:04 GMT, Prasanta Sadhukhan  wrote:
>
>> The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
>> The getPathBounds() in BasicTreeUI returns null if tree or treeState is null.
>> Fixed the javadoc.
> This pull request has now been integrated.
>
> Changeset: 4d640760
> Author:    Prasanta Sadhukhan 
> URL:       https://git.openjdk.java.net/jdk/commit/4d64076058a4ec5df101b06572195ed5fdee6f64
> Stats:     2 lines in 2 files changed: 0 ins; 0 del; 2 mod
>
> 8047749: javadoc for getPathBounds() in TreeUI and BasicTreeUI is incorrect
>
> Reviewed-by: aivanov
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/7421



From duke at openjdk.java.net  Sat Feb 12 03:07:09 2022
From: duke at openjdk.java.net (duke)
Date: Sat, 12 Feb 2022 03:07:09 GMT
Subject: Withdrawn: JDK-8275923: Override the LPR path using a system property
In-Reply-To: 
References: 
Message-ID: 

On Wed, 20 Oct 2021 20:38:17 GMT, Rolf van Kleef  wrote:

> On some select systems, the LPR binary may be placed elsewhere (for example at `/app/bin/lpr`). For that reason, we need to be able to override this value. This proposal also allows overriding the LP's path, as it could experience similar difficulties.

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6052


From kizune at openjdk.java.net  Sat Feb 12 09:30:05 2022
From: kizune at openjdk.java.net (Alexander Zuev)
Date: Sat, 12 Feb 2022 09:30:05 GMT
Subject: Integrated: 8281033: Improve ImageCheckboxTest to test all available
 LaF
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 10:47:41 GMT, Alexander Zuev  wrote:

> Test modified to perform test on all available LaF's
> During test development bug similar to JDK-8216358 was found in Nimbus and GTK+ LaFs
> so exceptions were added and separate bugs were created to track these LaFs.

This pull request has now been integrated.

Changeset: aa918a6e
Author:    Alexander Zuev 
URL:       https://git.openjdk.java.net/jdk/commit/aa918a6ec4cd1356efd481c6f6fa94959f94f7b3
Stats:     49 lines in 1 file changed: 38 ins; 1 del; 10 mod

8281033: Improve ImageCheckboxTest to test all available LaF

Reviewed-by: serb

-------------

PR: https://git.openjdk.java.net/jdk/pull/7439


From serb at openjdk.java.net  Sat Feb 12 22:13:06 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Sat, 12 Feb 2022 22:13:06 GMT
Subject: Integrated: 8274939: Incorrect size of the pixel storage is used by
 the robot on macOS
In-Reply-To: 
References: 
Message-ID: 

On Fri, 8 Oct 2021 10:23:13 GMT, Sergey Bylokhov  wrote:

> In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS.
> 
> It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case.
> 
> Solution is to allocate the storage of the proper size 1 * scale * 1 * scale

This pull request has now been integrated.

Changeset: eff5dafb
Author:    Sergey Bylokhov 
URL:       https://git.openjdk.java.net/jdk/commit/eff5dafba9f72bd0612357712ffa472ce1c9166a
Stats:     12 lines in 3 files changed: 7 ins; 0 del; 5 mod

8274939: Incorrect size of the pixel storage is used by the robot on macOS

Reviewed-by: aivanov, prr

-------------

PR: https://git.openjdk.java.net/jdk/pull/5864


From philip.race at oracle.com  Sat Feb 12 22:26:37 2022
From: philip.race at oracle.com (Philip Race)
Date: Sat, 12 Feb 2022 14:26:37 -0800
Subject: Area#add(Area) Optimization
In-Reply-To: 
References: 
Message-ID: <6a791257-0ebb-e6be-fb8d-4891b6b87921@oracle.com>

I suppose this could be added but it is something an application also 
can easily do for itself.

 > ??? curves = rhs.curves;

The straight reference, rather than a copy surprised me, but I suppose 
(I am not familiar
with the working of the Area class) that all mutations must create a new 
Vector ...

-phil.


On 2/11/22 3:51 PM, Jeremy Wood wrote:
> I?m working a lot with the Area class lately. Is there any interest in 
> the following optimization?
>
> Area#add(Area) currently resembles:
>
> public void add(Area rhs) {
> ? curves = new AreaOp.AddOp().calculate(this.curves, rhs.curves);
> ? invalidateBounds();
> }
>
> I propose replacing it with:
>
> public void add(Area rhs) {
> ? if (isEmpty()) {
> ??? curves = rhs.curves;
> ? } else if (rhs.isEmpty()) {
> ??? return;
> ? } else {
> ??? curves = new AreaOp.AddOp().calculate(this.curves, rhs.curves);
> ? }
> ? invalidateBounds();
> }
>
> If either operand is empty then this is effectively a null op. But the 
> current implementation may still take several seconds to return 
> depending on the complexity of the non-empty operand.
>
> For example the following two snippets of code may have significantly 
> different execution times:
>
> Area sum = new Area();
> for(Shape shape : incomingShapes) {
> ? sum.add(new Area(shape));
> }
>
> vs
>
> Area sum = new Area(shapes.get(0));
> for(int a = 1; a < incomingShapes.size(); a++) {
> ? Shape shape = incomingShapes.get(a);
> ? sum.add(new Area(shape));
> }
>
> And similarly we could review the other operations 
> (subtract/intersect/exclusiveOr/transform) for obvious potential null 
> ops.
>
> If I understand openjdk rules correctly: I'm not authorized to submit 
> an openJDK ticket. Does this interest anyone else on this list enough 
> to submit this as an openJDK ticket? (I'm happy to work on it if I can 
> help.)
>
> Regards,
> ?- Jeremy



From psadhukhan at openjdk.java.net  Mon Feb 14 04:40:09 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Mon, 14 Feb 2022 04:40:09 GMT
Subject: RFR: 8047749: javadoc for getPathBounds() in TreeUI and
 BasicTreeUI is incorrect
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 08:11:04 GMT, Prasanta Sadhukhan  wrote:

> The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
> The getPathBounds() in BasicTreeUI returns null if tree or treeState is null. 
> Fixed the javadoc.

> _Mailing list message from [Philip Race](mailto:philip.race at oracle.com) on [client-libs-dev](mailto:client-libs-dev at mail.openjdk.java.net):_
> 
> This should have had a CSR. Valid -> Invalid is fixing a typo for sure but a very significant one in the context.
> 
> Please retroactively submit the CSR.
> 
> -phil.
> 
> On 2/11/22 1:43 AM, Prasanta Sadhukhan wrote:

CSR raised [JDK-8281692](https://bugs.openjdk.java.net/browse/JDK-8281692)

-------------

PR: https://git.openjdk.java.net/jdk/pull/7421


From psadhukhan at openjdk.java.net  Mon Feb 14 04:51:12 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Mon, 14 Feb 2022 04:51:12 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v7]
In-Reply-To: <0QOAo2SFeqRgFF9YJQhlYwjvXsJsI48xGrf69E3bJVI=.85d81390-caa8-4721-a737-063fbe4f772d@github.com>
References: 
 <0QOAo2SFeqRgFF9YJQhlYwjvXsJsI48xGrf69E3bJVI=.85d81390-caa8-4721-a737-063fbe4f772d@github.com>
Message-ID: 

On Fri, 11 Feb 2022 18:31:56 GMT, Harshitha Onkar  wrote:

>> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
>> 
>> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
>> 
>> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revised test case - changed string to int comparison, expanded imports

Marked as reviewed by psadhukhan (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From psadhukhan at openjdk.java.net  Mon Feb 14 04:51:12 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Mon, 14 Feb 2022 04:51:12 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v6]
In-Reply-To: 
References: 
 
 
 
Message-ID: 

On Fri, 11 Feb 2022 18:53:11 GMT, Harshitha Onkar  wrote:

>> test/jdk/javax/swing/JTableHeader/8016524/JTHeaderBorderTest.java line 90:
>> 
>>> 88:                 String headerColor = Integer.toHexString(table.getTableHeader().getBackground().getRGB());
>>> 89:                 String pixelColor = tableColor;
>>> 90:                 boolean isBottomLineVisible = false;
>> 
>> To nitpick, I will much rather use Color instead of converting to String as we are trying to check and compare for Color but it's not a dealbreaker.
>
> @prsadhuk  BufferedImage's getRGB() method returns a int value and does not have equivalent method that returns a Color object (at specified coordinates), I was able to change string comparisons to int. Please let me know if this should be okay?

You could have used getBackground() itself to get a Color object but amnot finicky about it, its upto you.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From psadhukhan at openjdk.java.net  Mon Feb 14 06:56:10 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Mon, 14 Feb 2022 06:56:10 GMT
Subject: RFR: 8236907: JTable added to nested panels does not paint last
 visible row
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 09:49:41 GMT, Tejesh R  wrote:

> Issue in painting last row of JTable due to decrement in `MaxRow `during computation. Differences in `MaxRow `computation between `TablePrintable` and `BasicTableUI `class. The Bug is fixed in both the classes. Test Case added to validate the same.

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java line 1903:

> 1901:     private void paintDropLines(Graphics g) {
> 1902:         JTable.DropLocation loc = table.getDropLocation();
> 1903:         if (loc == null) {

Deleting this seems to have regressed JDK-8081491 where 1 extra row is printed per page..
jdk/test/java/awt/print/PageFormat/ImageableAreaTest.java is supposed to print 35 rows which was visible in console but it prints 36 rows..

-------------

PR: https://git.openjdk.java.net/jdk/pull/7422


From psadhukhan at openjdk.java.net  Mon Feb 14 07:37:47 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Mon, 14 Feb 2022 07:37:47 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v3]
In-Reply-To: 
References: 
Message-ID: 

> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
> 
> Fixed to reverse the direction traversal for RTL orientation.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  fix

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7396/files
  - new: https://git.openjdk.java.net/jdk/pull/7396/files/19b72d40..5ffb721d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7396&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7396&range=01-02

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

PR: https://git.openjdk.java.net/jdk/pull/7396


From duke at openjdk.java.net  Mon Feb 14 09:40:49 2022
From: duke at openjdk.java.net (Martin Desruisseaux)
Date: Mon, 14 Feb 2022 09:40:49 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v3]
In-Reply-To: 
References: 
Message-ID: 

> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`.
> 
> https://bugs.openjdk.java.net/browse/JDK-8275345

Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:

  Make the test class public for allowing execution by jtreg.
  Fix a compiler warning about raw type.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7337/files
  - new: https://git.openjdk.java.net/jdk/pull/7337/files/fea2f9c0..8b4e6f57

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7337&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7337&range=01-02

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

PR: https://git.openjdk.java.net/jdk/pull/7337


From duke at openjdk.java.net  Mon Feb 14 09:56:11 2022
From: duke at openjdk.java.net (Martin Desruisseaux)
Date: Mon, 14 Feb 2022 09:56:11 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v3]
In-Reply-To: 
References: 
 
Message-ID: 

On Mon, 14 Feb 2022 09:40:49 GMT, Martin Desruisseaux  wrote:

>> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`.
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8275345
>
> Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make the test class public for allowing execution by jtreg.
>   Fix a compiler warning about raw type.

Change applied. Should I squash and/or rebase commits?

Regarding jtreg, I cloned the [master](https://github.com/openjdk/jtreg) (maybe I should have used a tag instead). But the [documentation](https://openjdk.java.net/jtreg/build.html) seems slightly outdated (script names changed). The `README.md` file on GitHub seems more up-to-date.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From djelinski at openjdk.java.net  Mon Feb 14 13:09:10 2022
From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=)
Date: Mon, 14 Feb 2022 13:09:10 GMT
Subject: RFR: 8281523: Accessibility: Conversion from string literal loses
 const qualifier
In-Reply-To: 
References: 
Message-ID: 

On Tue, 8 Feb 2022 11:41:16 GMT, Daniel Jeli?ski  wrote:

> This patch fixes jdk.accessibility compilation under VisualStudio 2019 with /Zc:strictStrings enabled.
> 
> Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well.

Hi, can I get a review for this change? 
This is similar to #7379, but in a different subcomponent (Accessibility vs. AWT). I added `const` qualifier to a bunch of function parameters.

Additionally I removed one (unused) function and one (mismatching) function declaration; build passed, tier1 and tier2 green. Verified with both vs2019 and vs2017.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7380


From mvs at openjdk.java.net  Mon Feb 14 14:14:32 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Mon, 14 Feb 2022 14:14:32 GMT
Subject: RFR: 8281738: Create a regression test for checking the 'Space' key
 activation of focused Button
Message-ID: 

This test verifies in all platforms and in all 'Look and Feels' that pressing the 'Space' key generates ActionEvent on focused Button or not.

-------------

Commit messages:
 - 8281738: Create a regression test for checking the 'Space' key activation of focused Button

Changes: https://git.openjdk.java.net/jdk/pull/7460/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7460&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8281738
  Stats: 116 lines in 1 file changed: 116 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7460.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7460/head:pull/7460

PR: https://git.openjdk.java.net/jdk/pull/7460


From mvs at openjdk.java.net  Mon Feb 14 14:14:33 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Mon, 14 Feb 2022 14:14:33 GMT
Subject: RFR: 8281738: Create a regression test for checking the 'Space'
 key activation of focused Button
In-Reply-To: 
References: 
Message-ID: 

On Mon, 14 Feb 2022 14:04:33 GMT, Manukumar V S  wrote:

> This test verifies in all platforms and in all 'Look and Feels' that pressing the 'Space' key generates ActionEvent on focused Button or not.

@aivanov-jdk Can you please review this.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7460


From smandalika at openjdk.java.net  Mon Feb 14 15:57:09 2022
From: smandalika at openjdk.java.net (Srinivas Mandalika)
Date: Mon, 14 Feb 2022 15:57:09 GMT
Subject: RFR: 8281569: Create tests for Frame.setMinimumSize() method
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 17:28:09 GMT, Srinivas Mandalika  wrote:

> Create tests for setMinimumSize functionality
> Create a test which verifies that on increasing the Frame's minimumSize, it gets reflected in the subsequent getSize call
> Create a test which verifies that on frame resizes back to minimumSize on calling pack.

Can someone review this PR?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7444


From achung at openjdk.java.net  Mon Feb 14 17:13:33 2022
From: achung at openjdk.java.net (Alisen Chung)
Date: Mon, 14 Feb 2022 17:13:33 GMT
Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150
 scale factor
Message-ID: 

Changed the drawing area to be increased by 0.5 on the left side to prevent clipping

-------------

Commit messages:
 - trailing whitespace, add extra newline at eof
 - changed carriage return
 - changed carriage return
 - 8279614: The left line of the TitledBorder is not painted on 150 scale factor
 - finished test
 - initial commit

Changes: https://git.openjdk.java.net/jdk/pull/7449/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279614
  Stats: 102 lines in 2 files changed: 98 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7449.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7449/head:pull/7449

PR: https://git.openjdk.java.net/jdk/pull/7449


From serb at openjdk.java.net  Mon Feb 14 17:13:37 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 17:13:37 GMT
Subject: RFR: 8279614: The left line of the TitledBorder is not painted on
 150 scale factor
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 23:44:22 GMT, Alisen Chung  wrote:

> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping

src/java.desktop/share/classes/javax/swing/border/TitledBorder.java line 354:

> 352:                         Graphics2D g2d = (Graphics2D) g2;
> 353:                         Path2D path = new Path2D.Float();
> 354:                         path.append(new Rectangle2D.Float((float) borderX, borderY, borderW, labelY - borderY), false);

Why the current coordinates do not work, is it because we calculate them in the wrong way or probably the insets are wrong?

test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 1:

> 1: import java.awt.BorderLayout;

To prevent all this jcheck issue you can install the jcheck hook locally.

test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 51:

> 49:       saveImage(buff, "test.png");
> 50:       throw new RuntimeException("Border was clipped or overdrawn.");
> 51:     }

Can we draw directly to the buffered image using the scaled graphics to reproduce the bug?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7449


From achung at openjdk.java.net  Mon Feb 14 17:13:38 2022
From: achung at openjdk.java.net (Alisen Chung)
Date: Mon, 14 Feb 2022 17:13:38 GMT
Subject: RFR: 8279614: The left line of the TitledBorder is not painted on
 150 scale factor
In-Reply-To: 
References: 
 
Message-ID: 

On Sat, 12 Feb 2022 01:10:49 GMT, Sergey Bylokhov  wrote:

>> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping
>
> src/java.desktop/share/classes/javax/swing/border/TitledBorder.java line 354:
> 
>> 352:                         Graphics2D g2d = (Graphics2D) g2;
>> 353:                         Path2D path = new Path2D.Float();
>> 354:                         path.append(new Rectangle2D.Float((float) borderX, borderY, borderW, labelY - borderY), false);
> 
> Why the current coordinates do not work, is it because we calculate them in the wrong way or probably the insets are wrong?

I think there's a rounding error when doing x.5 scalings causing the drawing area to be one pixel too small on the left side

> test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 51:
> 
>> 49:       saveImage(buff, "test.png");
>> 50:       throw new RuntimeException("Border was clipped or overdrawn.");
>> 51:     }
> 
> Can we draw directly to the buffered image using the scaled graphics to reproduce the bug?

Yea, the test fails before the fix, and when inspecting the saved image it looks identical to the actual frame.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7449


From duke at openjdk.java.net  Mon Feb 14 18:13:12 2022
From: duke at openjdk.java.net (DamonGuy)
Date: Mon, 14 Feb 2022 18:13:12 GMT
Subject: RFR: 8012675: Javadoc for
 javax.swing.text.html.parser.Parser.handleComment() needs to be updated
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 19:20:16 GMT, DamonGuy  wrote:

> Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc.

The script tag is a special case and has its own check in the 'parseTag' function. It specifically looks for the "script" element and logs an error if this is reached. I assume this code has existed since at least 2017 when the 'parseTag' function was brought up as the cause on the JBS report, but the issue has existed since 2013.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7446


From serb at openjdk.java.net  Mon Feb 14 18:27:11 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 18:27:11 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
Message-ID: 

On Fri, 11 Feb 2022 08:09:06 GMT, Maxim Kartashev  wrote:

>> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2876:
>> 
>>> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,
>>> 2875:      int x, jint y, jint width, jint height, jint jwidth, int dx, int dy,
>>> 2876:                                                                    jint scale) {
>> 
>> Is this scale parameter is simply ignored? If the passed parameters are always in the device space and the array is allocated properly then we should not care about this scale(especially in case of gtk2)?
>
>> Is this scale parameter is simply ignored?
> 
> Looks like it. I can only find one call site of `get_drawable_data()` (in [Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl()](https://github.com/openjdk/jdk/blob/8441d51e71e143250b44eea74114a624cf00cc3e/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c#L336)) and the `scale` parameter is always 1. I think I can drop it from the interface if you prefer.

Yes please, this "scale" just make the code complicated w/o reason.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From prr at openjdk.java.net  Mon Feb 14 18:45:09 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 18:45:09 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v3]
In-Reply-To: 
References: 
 
Message-ID: 

On Mon, 14 Feb 2022 09:40:49 GMT, Martin Desruisseaux  wrote:

>> This commit fixes a `RasterFormatException` thrown when `Graphics2D.drawRenderedImage(?)` is invoked with an image containing tiles that are instances of `Raster` but not `WritableRaster`.
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8275345
>
> Martin Desruisseaux has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make the test class public for allowing execution by jtreg.
>   Fix a compiler warning about raw type.

Marked as reviewed by prr (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From duke at openjdk.java.net  Mon Feb 14 18:56:14 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Mon, 14 Feb 2022 18:56:14 GMT
Subject: Withdrawn: JDK-6998249: Wrong behavior/Javadoc of
 JTable.tableChanged(TableModelEvent e)
In-Reply-To: 
References: 
Message-ID: <8b9h0Tm4R2TpJIwR5KZ2oTmyKI6wZ8JwN63Ijn4UlwY=.adc1b48c-6c74-4b32-a199-61147a333700@github.com>

On Thu, 27 Jan 2022 22:11:27 GMT, Harshitha Onkar  wrote:

> Updated JTable's tableChanged() method docs to explicitly mention the coordinate system of the rows and columns.

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7253


From prr at openjdk.java.net  Mon Feb 14 20:11:19 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 20:11:19 GMT
Subject: RFR: 8240756: [macos] SwingSet2:TableDemo:Printed Japanese
 characters were garbled [v4]
In-Reply-To: 
References: 
 
Message-ID: 

On Thu, 6 Jan 2022 02:49:17 GMT, Toshio Nakamura  wrote:

>> Hi,
>> 
>> Could you review the fix?
>> When non-English characters were printed from JTable on MacOS, CTextPipe.doDrawGlyphs was called by OSXSurfaceData.drawGlyphs. However, CTextPipe seems not support glyph with slot number of composite fonts.
>> 
>> The slot data mask of GlyphVector is 0xff000000. In my environment, Japanese font was loaded at slot 4, and glyph data is like [0x40003e5]. Then, unexpected glyph was drawn.
>
> Toshio Nakamura 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:
> 
>  - Revised according to review comments
>  - Merge branch 'master' into 8240756
>  - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled
>  - revert previous proposal
>  - Merge branch 'master' into 8240756
>  - 2nd proposal
>  - Revert previous change
>  - Merge branch 'master' into 8240756
>    merge master
>  - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled

Marked as reviewed by prr (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/3619


From prr at openjdk.java.net  Mon Feb 14 20:16:13 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 20:16:13 GMT
Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at
 initial drawing [v2]
In-Reply-To: 
References: 
 
Message-ID: <1xgNYge02zcX-kfQ343p2YT4v2MIbym5SHL_fDnqMPI=.ab03d946-c8ec-4a2f-871a-8d58e6a30f43@github.com>

On Thu, 28 Oct 2021 08:27:44 GMT, Masanori Yano  wrote:

>> Could you please review the 8275715 bug fixes?
>> 
>> I think D3DScreenUpdateManager posts unnecessary PaintEvent during processing PaintEvent. When the validate method is called from createGraphics, repaintPeerTarget should not be called.
>
> Masanori Yano has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8275715: D3D pipeline processes multiple PaintEvent at initial drawing

Ok. Please confirm you have run all automated headful jtreg tests on a system with D3D enabled
and that you have also done manual testing (using SwingSet2 and J2Ddemo) and no problems are observed ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/6064


From prr at openjdk.java.net  Mon Feb 14 20:46:11 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 20:46:11 GMT
Subject: RFR: 8281523: Accessibility: Conversion from string literal loses
 const qualifier
In-Reply-To: 
References: 
Message-ID: <6VxLBE8N65L47E6Ydt7o5AQAciKaskdxm7o5eiaifCA=.bf546555-23fc-499c-a5ad-11b707ca4458@github.com>

On Tue, 8 Feb 2022 11:41:16 GMT, Daniel Jeli?ski  wrote:

> This patch fixes jdk.accessibility compilation under VisualStudio 2019 with /Zc:strictStrings enabled.
> 
> Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well.

src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp line 149:

> 147:     /**
> 148:      * Send Java debugging info to the appropriate place
> 149:      */

Deleting this function - without comment !  - seems to be somewhat out of scope here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7380


From prr at openjdk.java.net  Mon Feb 14 20:59:08 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 20:59:08 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v3]
In-Reply-To: 
References: 
 
Message-ID: 

On Mon, 14 Feb 2022 07:37:47 GMT, Prasanta Sadhukhan  wrote:

>> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
>> 
>> Fixed to reverse the direction traversal for RTL orientation.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix

Seems to me right should move right and left move left, so OK by me but
I'd like to make sure this is seen by @naotoj too.

-------------

Marked as reviewed by prr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7396


From naoto at openjdk.java.net  Mon Feb 14 21:11:12 2022
From: naoto at openjdk.java.net (Naoto Sato)
Date: Mon, 14 Feb 2022 21:11:12 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v3]
In-Reply-To: 
References: 
 
Message-ID: 

On Mon, 14 Feb 2022 07:37:47 GMT, Prasanta Sadhukhan  wrote:

>> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
>> 
>> Fixed to reverse the direction traversal for RTL orientation.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix

Marked as reviewed by naoto (Reviewer).

Caret should move visually, so VK_RIGHT should move it to the right. Fine by me.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7396


From aivanov at openjdk.java.net  Mon Feb 14 21:15:11 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Mon, 14 Feb 2022 21:15:11 GMT
Subject: RFR: 8275345: RasterFormatException when drawing a tiled image
 made of non-writable rasters [v2]
In-Reply-To: 
References: 
 
 <1cuXpSh6COBJPM5zkFzZUXqPj_a-KE-7zZOnlk5rRwE=.72f96193-37e6-4fad-8c61-953197d2545c@github.com>
 
Message-ID: 

On Fri, 11 Feb 2022 10:40:20 GMT, Martin Desruisseaux  wrote:

>> test/jdk/java/awt/image/DrawImage/TiledImage.java line 98:
>> 
>>> 96:  */
>>> 97: final class TiledImage implements RenderedImage {
>>> 98:     /**
>> 
>> Still not right. Now you added the tags I ran under jtreg and it errored out.
>> result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainThread cannot access a member of class TiledImage with modifiers "public static
>> 
>> Basically change "final" to "public" - or at least add public. 
>> 
>> Might be prudent to try this for yourself - and useful for the future.
>> jtreg instructions for building it can be found here : https://openjdk.java.net/jtreg/build.html
>> Very possibly there's someone that provides a pre-built binary. There's none on OpenJDK.
>
> Thanks for the tips and your patience. Actually I tried to run jtreg yesterday before to commit the change, but got the following error (I wanted to try on Java 17 first in order to verify that the test failed):
> 
> 
> jtreg -jdk:$JAVA_HOME test/jdk/java/awt/image/DrawImage/TiledImage.java
> 
> 
> failed to get value for vm.cds.write.archived.java.heap
> java.lang.UnsatisfiedLinkError: 'boolean jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive()'
> 	at jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive(Native Method)
> 	at requires.VMProps.vmCDSCanWriteArchivedJavaHeap(VMProps.java:413)
> 	at requires.VMProps$SafeMap.put(VMProps.java:72)
> 	at requires.VMProps.call(VMProps.java:113)
> 	at requires.VMProps.call(VMProps.java:60)
> 	at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)
> 	at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)
> 
> I'm sure I did something wrong with my configuration?

@desruisseaux You can take the jtreg builds from @shipilev: https://builds.shipilev.net/jtreg/

-------------

PR: https://git.openjdk.java.net/jdk/pull/7337


From djelinski at openjdk.java.net  Mon Feb 14 21:25:42 2022
From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=)
Date: Mon, 14 Feb 2022 21:25:42 GMT
Subject: RFR: 8281523: Accessibility: Conversion from string literal loses
 const qualifier [v2]
In-Reply-To: 
References: 
Message-ID: 

> This patch fixes jdk.accessibility compilation under VisualStudio 2019 with /Zc:strictStrings enabled.
> 
> Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well.

Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision:

  Revert "Remove dead code"
  
  This reverts commit 8576f911d5389695fbe3c6462db2c36939ede54f.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7380/files
  - new: https://git.openjdk.java.net/jdk/pull/7380/files/8576f911..fc67bf6e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7380&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7380&range=00-01

  Stats: 28 lines in 2 files changed: 28 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7380.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7380/head:pull/7380

PR: https://git.openjdk.java.net/jdk/pull/7380


From djelinski at openjdk.java.net  Mon Feb 14 21:25:44 2022
From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=)
Date: Mon, 14 Feb 2022 21:25:44 GMT
Subject: RFR: 8281523: Accessibility: Conversion from string literal loses
 const qualifier [v2]
In-Reply-To: <6VxLBE8N65L47E6Ydt7o5AQAciKaskdxm7o5eiaifCA=.bf546555-23fc-499c-a5ad-11b707ca4458@github.com>
References: 
 <6VxLBE8N65L47E6Ydt7o5AQAciKaskdxm7o5eiaifCA=.bf546555-23fc-499c-a5ad-11b707ca4458@github.com>
Message-ID: <2KOhEky7boAehUzdcHITlwp73o6m0Ld3ULjujM416NQ=.aa2646fa-37c1-4088-af01-c98c95bd47f8@github.com>

On Mon, 14 Feb 2022 20:42:48 GMT, Phil Race  wrote:

>> Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revert "Remove dead code"
>>   
>>   This reverts commit 8576f911d5389695fbe3c6462db2c36939ede54f.
>
> src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp line 149:
> 
>> 147:     /**
>> 148:      * Send Java debugging info to the appropriate place
>> 149:      */
> 
> Deleting this function - without comment !  - seems to be somewhat out of scope here.

Reverted.

I removed this function because its definition (`PrintJavaDebugString2`) did not match the declaration (`PrintJavaDebugString`), so the function wasn't really usable. I'm fine with leaving it as is, or cleaning up separately.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7380


From aivanov at openjdk.java.net  Mon Feb 14 21:49:03 2022
From: aivanov at openjdk.java.net (Alexey Ivanov)
Date: Mon, 14 Feb 2022 21:49:03 GMT
Subject: RFR: 8281555: [macos] Get rid of deprecated Style Masks constants
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 17:50:48 GMT, Dmitry Markov  wrote:

> The Style Masks constants [1], which are utilised by AWT, were deprecated starting from macOS 10.12 Sierra. It is high time to replace them with new constants introduced by NSWindowStyleMask enumeration [2].
> 
> [1] - https://developer.apple.com/documentation/appkit/nspanel/style_masks
> [2] - https://developer.apple.com/documentation/appkit/nswindowstylemask

Marked as reviewed by aivanov (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7408


From serb at openjdk.java.net  Mon Feb 14 23:19:09 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 23:19:09 GMT
Subject: RFR: 8269091: javax/sound/sampled/Clip/SetPositionHang.java failed
 with ArrayIndexOutOfBoundsException: Array index out of range: -4 [v2]
In-Reply-To: 
References: 
 
Message-ID: 

On Fri, 11 Feb 2022 23:28:43 GMT, Phil Race  wrote:

>> This test has started failing since we got M1 macs to test on. I don't think we've ever seen this failure elsewhere.
>> I don't know what it is about that architecture that makes it more likely but I can see how it can happen when multiple threads are using the same instance. 
>> 
>>                     if (newFramePosition >= 0) { 
>>                         clipBytePosition = newFramePosition * frameSize; 
>>                         newFramePosition = -1; 
>>                     } 
>> 
>> newFramePosition is declared volatile which does make it quite possible that after the read and before the use it will have changed.
>> 
>> The fix just synchronizes this block to prevent it.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4

Marked as reviewed by serb (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7436


From serb at openjdk.java.net  Mon Feb 14 23:20:11 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 23:20:11 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v3]
In-Reply-To: 
References: 
 
Message-ID: <_sYIaWnrkzAIkblsV-NWZbdp-Q_N0qhWP5f3uzbujNM=.d26881d4-8f19-4bec-878b-116f6c449992@github.com>

On Mon, 14 Feb 2022 07:37:47 GMT, Prasanta Sadhukhan  wrote:

>> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
>> 
>> Fixed to reverse the direction traversal for RTL orientation.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix

Marked as reviewed by serb (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7396


From serb at openjdk.java.net  Mon Feb 14 23:27:17 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 23:27:17 GMT
Subject: RFR: 8281738: Create a regression test for checking the 'Space'
 key activation of focused Button
In-Reply-To: 
References: 
Message-ID: <8RrJ1npXH7WIbx_4f6CKmNMb-kLGItFWEmyWELDtJyw=.02443c61-7916-4c15-b5dc-80c9527830be@github.com>

On Mon, 14 Feb 2022 14:04:33 GMT, Manukumar V S  wrote:

> This test verifies in all platforms and in all 'Look and Feels' that pressing the 'Space' key generates ActionEvent on focused Button or not.

test/jdk/javax/swing/JButton/SpaceKeyActivatesButton.java line 67:

> 65:                     createUI();
> 66:                 });
> 67: 

I think you should add robot.waitForIdle() after the frame creation, and also wait until the button will get a focus, since the "requestFocusInWindow" might be ignored.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7460


From serb at openjdk.java.net  Mon Feb 14 23:29:10 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Mon, 14 Feb 2022 23:29:10 GMT
Subject: RFR: 8279614: The left line of the TitledBorder is not painted on
 150 scale factor
In-Reply-To: 
References: 
 
 
Message-ID: 

On Mon, 14 Feb 2022 16:45:09 GMT, Alisen Chung  wrote:

>> src/java.desktop/share/classes/javax/swing/border/TitledBorder.java line 354:
>> 
>>> 352:                         Graphics2D g2d = (Graphics2D) g2;
>>> 353:                         Path2D path = new Path2D.Float();
>>> 354:                         path.append(new Rectangle2D.Float((float) borderX, borderY, borderW, labelY - borderY), false);
>> 
>> Why the current coordinates do not work, is it because we calculate them in the wrong way or probably the insets are wrong?
>
> I think there's a rounding error when doing x.5 scalings causing the drawing area to be one pixel too small on the left side

Can you please check how it will work for the undecorated frame, if it will be fine then the problem is somehow related to the size of the insets.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7449


From prr at openjdk.java.net  Mon Feb 14 23:35:14 2022
From: prr at openjdk.java.net (Phil Race)
Date: Mon, 14 Feb 2022 23:35:14 GMT
Subject: Integrated: 8269091: javax/sound/sampled/Clip/SetPositionHang.java
 failed with ArrayIndexOutOfBoundsException: Array index out of range: -4
In-Reply-To: 
References: 
Message-ID: 

On Thu, 10 Feb 2022 23:57:29 GMT, Phil Race  wrote:

> This test has started failing since we got M1 macs to test on. I don't think we've ever seen this failure elsewhere.
> I don't know what it is about that architecture that makes it more likely but I can see how it can happen when multiple threads are using the same instance. 
> 
>                     if (newFramePosition >= 0) { 
>                         clipBytePosition = newFramePosition * frameSize; 
>                         newFramePosition = -1; 
>                     } 
> 
> newFramePosition is declared volatile which does make it quite possible that after the read and before the use it will have changed.
> 
> The fix just synchronizes this block to prevent it.

This pull request has now been integrated.

Changeset: 1a7b70a8
Author:    Phil Race 
URL:       https://git.openjdk.java.net/jdk/commit/1a7b70a8be0a236b98925a8320d25d88a405d595
Stats:     4 lines in 2 files changed: 1 ins; 0 del; 3 mod

8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4

Reviewed-by: serb

-------------

PR: https://git.openjdk.java.net/jdk/pull/7436


From prr at openjdk.java.net  Tue Feb 15 00:53:17 2022
From: prr at openjdk.java.net (Phil Race)
Date: Tue, 15 Feb 2022 00:53:17 GMT
Subject: RFR: 8277369: Strange behavior of JMenuBar with RIGHT_TO_LEFT
 orientation, arrow keys behaves opposite traversing through keyboard [v3]
In-Reply-To: 
References: 
 
Message-ID: <3cXDnguRwZYVyDSoA4_7aDaqkUckQpgKOe5bETIPNHI=.304a3871-ff70-4b23-9f21-3a4a6033417f@github.com>

On Mon, 14 Feb 2022 07:37:47 GMT, Prasanta Sadhukhan  wrote:

>> After applying setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) to the JMenuBar the arrow keys started to behave the opposite of what expected. Right arrow goes left and Left arrow goes right when trying to traverse through keyboard.
>> 
>> Fixed to reverse the direction traversal for RTL orientation.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix

BTW I was just looking around and if you do a google search on "rtl arrow key backward" it looks to me as if multiple unrelated open source projects happen to have had the same issue (not SFAICT Java based) and came to the same conclusion.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7396


From prr at openjdk.java.net  Tue Feb 15 00:48:10 2022
From: prr at openjdk.java.net (Phil Race)
Date: Tue, 15 Feb 2022 00:48:10 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
Message-ID: <0yMXWGYN_p2SQbk8Yqer8hKkjNXRnxyzx-v1AsoeuOo=.92a7afdf-6f62-4216-9052-971fc3d896fc@github.com>

On Fri, 11 Feb 2022 14:05:39 GMT, Maxim Kartashev  wrote:

>> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
>> 
>> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
>> 
>> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
>> 
>> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
>> 
>> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
>> 
>> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.
>
> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updated copyright date in TestJProgressBarHighlightColor.java

src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2867:

> 2865: 
> 2866: inline static int scale_down_to_plus_inf(int what, int scale) {
> 2867:     return (int)ceilf(what / (float)scale);

I find the name of this and the companion function confusing.
what is "inf" short for ? I see that and I think plus_infinity.
scaled_ceiling and scaled_floor might be better names based on what I see.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From prr at openjdk.java.net  Tue Feb 15 00:56:07 2022
From: prr at openjdk.java.net (Phil Race)
Date: Tue, 15 Feb 2022 00:56:07 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v7]
In-Reply-To: <0QOAo2SFeqRgFF9YJQhlYwjvXsJsI48xGrf69E3bJVI=.85d81390-caa8-4721-a737-063fbe4f772d@github.com>
References: 
 <0QOAo2SFeqRgFF9YJQhlYwjvXsJsI48xGrf69E3bJVI=.85d81390-caa8-4721-a737-063fbe4f772d@github.com>
Message-ID: <8v-9hZAJ6J8j1-kNgHgkCXeFHVr5Nco5A2Z7uc1jjwI=.66ed4047-9f3e-40fc-b9ce-1dca621fa41e@github.com>

On Fri, 11 Feb 2022 18:31:56 GMT, Harshitha Onkar  wrote:

>> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
>> 
>> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
>> 
>> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revised test case - changed string to int comparison, expanded imports

Marked as reviewed by prr (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From philip.race at oracle.com  Tue Feb 15 01:00:03 2022
From: philip.race at oracle.com (Philip Race)
Date: Mon, 14 Feb 2022 17:00:03 -0800
Subject: RFR: 8047749: javadoc for getPathBounds() in TreeUI and
 BasicTreeUI is incorrect
In-Reply-To: 
References: 
 
Message-ID: <8a3bda03-3166-da4c-9132-74079422b261@oracle.com>

CSR reviewed.

-phil

On 2/13/22 8:40 PM, Prasanta Sadhukhan wrote:
> On Thu, 10 Feb 2022 08:11:04 GMT, Prasanta Sadhukhan  wrote:
>
>> The javadoc descriptions for javax.swing.plaf.TreeUI.getPathBounds() and javax.swing.plaf.basic.BasicTreeUI.getPathBounds() have stated it returns null if any component in path is currently "valid", which is wrong.
>> The getPathBounds() in BasicTreeUI returns null if tree or treeState is null.
>> Fixed the javadoc.
>> _Mailing list message from [Philip Race](mailto:philip.race at oracle.com) on [client-libs-dev](mailto:client-libs-dev at mail.openjdk.java.net):_
>>
>> This should have had a CSR. Valid -> Invalid is fixing a typo for sure but a very significant one in the context.
>>
>> Please retroactively submit the CSR.
>>
>> -phil.
>>
>> On 2/11/22 1:43 AM, Prasanta Sadhukhan wrote:
> CSR raised [JDK-8281692](https://bugs.openjdk.java.net/browse/JDK-8281692)
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/7421



From tnakamura at openjdk.java.net  Tue Feb 15 01:47:12 2022
From: tnakamura at openjdk.java.net (Toshio Nakamura)
Date: Tue, 15 Feb 2022 01:47:12 GMT
Subject: RFR: 8240756: [macos] SwingSet2:TableDemo:Printed Japanese
 characters were garbled [v4]
In-Reply-To: 
References: 
 
Message-ID: 

On Thu, 6 Jan 2022 02:49:17 GMT, Toshio Nakamura  wrote:

>> Hi,
>> 
>> Could you review the fix?
>> When non-English characters were printed from JTable on MacOS, CTextPipe.doDrawGlyphs was called by OSXSurfaceData.drawGlyphs. However, CTextPipe seems not support glyph with slot number of composite fonts.
>> 
>> The slot data mask of GlyphVector is 0xff000000. In my environment, Japanese font was loaded at slot 4, and glyph data is like [0x40003e5]. Then, unexpected glyph was drawn.
>
> Toshio Nakamura 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:
> 
>  - Revised according to review comments
>  - Merge branch 'master' into 8240756
>  - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled
>  - revert previous proposal
>  - Merge branch 'master' into 8240756
>  - 2nd proposal
>  - Revert previous change
>  - Merge branch 'master' into 8240756
>    merge master
>  - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled

Thank you for your approval, Phil.

May I have a second reviewer?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3619


From mvs at openjdk.java.net  Tue Feb 15 03:12:38 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Tue, 15 Feb 2022 03:12:38 GMT
Subject: RFR: 8281745: Create a regression test for JDK-4514331
Message-ID: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>

Create a regression test for JDK-4514331.
It checks whether pressing 'Tab' key always shift focus to next component, even though the current focus is in JTextArea and some text is already selected.

Testing:
I have verified this test with JDK 1.3.1 and JDK 1.4.1 .
The issue is reproducible with JDK 1.3.1 and the test failed there, where the bug was originally reported and the test passed in JDK 1.4.1 where the issue was fixed.
I have tested it in Linux, Mac and Windows platforms and it passed everywhere.

-------------

Commit messages:
 - Create a regression test for JDK-4514331

Changes: https://git.openjdk.java.net/jdk/pull/7469/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7469&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8281745
  Stats: 134 lines in 1 file changed: 134 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7469.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7469/head:pull/7469

PR: https://git.openjdk.java.net/jdk/pull/7469


From psadhukhan at openjdk.java.net  Tue Feb 15 05:07:13 2022
From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan)
Date: Tue, 15 Feb 2022 05:07:13 GMT
Subject: RFR: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader [v7]
In-Reply-To: 
References: 
 <5wjVB_FL_GYsLbqr_FEpBsFX3twlM9cXbrN8a3r2rDY=.e42f518a-dc26-49cb-9949-32426cf85fa8@github.com>
 
 
 <-R3bNESejIAwk69oyF_PrVq7d6W5V_GSzXT7ipoF8lY=.0bc69e39-c6cc-485f-ab95-98b6b0439078@github.com>
 
Message-ID: 

On Fri, 11 Feb 2022 01:17:38 GMT, Harshitha Onkar  wrote:

>> I got the 2nd part of the question myself which is because of white gridlines used in AquaLookAndFeel so invisible..
>
> @prsadhuk Ready for review. Changed the test case to paint JFrame to BufferedImage. The test case is marked headful though robot calls are not used, as the JFrame rendering requires it to be headful.

I believe you could raise a awt Robot issue for not getting correct pixel color via getPixelColor(x,y) on retina display (if you are sure [JDK-8274939](https://bugs.openjdk.java.net/browse/JDK-8274939) patch didn't help)

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Tue Feb 15 05:07:14 2022
From: duke at openjdk.java.net (Harshitha Onkar)
Date: Tue, 15 Feb 2022 05:07:14 GMT
Subject: Integrated: JDK-8016524: [macosx] Bottom line is not visible for
 JTableHeader
In-Reply-To: 
References: 
Message-ID: 

On Wed, 26 Jan 2022 00:12:17 GMT, Harshitha Onkar  wrote:

> Previously, the JTableHeader Bottom line wasn't visible on MacOS LAF (Aqua). With the fix the bottom line (light grey) is visible. 
> 
> Changes were made to AquaTableHeaderBorder.paintBorder method and the height of the component+border was adjusted in paint method.
> 
> A new test case (JTHeaderBorderTest.java) was added to test the fix as there was no corresponding test case present for this issue previously. The test checks if the border is visible by checking the color at the border location with the background color of the table and table-header, if both are different test case passes and it fails if the pixel color at border location matches either the table-header or table background color.

This pull request has now been integrated.

Changeset: f33329eb
Author:    Harshitha Onkar 
Committer: Prasanta Sadhukhan 
URL:       https://git.openjdk.java.net/jdk/commit/f33329eb7f7a1a541d8f30ba8952b0b922ac5257
Stats:     125 lines in 2 files changed: 123 ins; 0 del; 2 mod

8016524: [macosx] Bottom line is not visible for JTableHeader

Reviewed-by: psadhukhan, prr

-------------

PR: https://git.openjdk.java.net/jdk/pull/7219


From duke at openjdk.java.net  Tue Feb 15 05:28:14 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Tue, 15 Feb 2022 05:28:14 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: 
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 
 
Message-ID: 

On Mon, 14 Feb 2022 18:24:15 GMT, Sergey Bylokhov  wrote:

>>> Is this scale parameter is simply ignored?
>> 
>> Looks like it. I can only find one call site of `get_drawable_data()` (in [Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl()](https://github.com/openjdk/jdk/blob/8441d51e71e143250b44eea74114a624cf00cc3e/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c#L336)) and the `scale` parameter is always 1. I think I can drop it from the interface if you prefer.
>
> Yes please, this "scale" just make the code complicated w/o reason.

That's done; please, take a look at the updated code.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From duke at openjdk.java.net  Tue Feb 15 05:28:14 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Tue, 15 Feb 2022 05:28:14 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: <0yMXWGYN_p2SQbk8Yqer8hKkjNXRnxyzx-v1AsoeuOo=.92a7afdf-6f62-4216-9052-971fc3d896fc@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 <0yMXWGYN_p2SQbk8Yqer8hKkjNXRnxyzx-v1AsoeuOo=.92a7afdf-6f62-4216-9052-971fc3d896fc@github.com>
Message-ID: 

On Tue, 15 Feb 2022 00:43:42 GMT, Phil Race  wrote:

>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated copyright date in TestJProgressBarHighlightColor.java
>
> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2867:
> 
>> 2865: 
>> 2866: inline static int scale_down_to_plus_inf(int what, int scale) {
>> 2867:     return (int)ceilf(what / (float)scale);
> 
> I find the name of this and the companion function confusing.
> what is "inf" short for ? I see that and I think plus_infinity.
> scaled_ceiling and scaled_floor might be better names based on what I see.

Right, "inf" is for infinity; this is sort of how the rounding modes are described in the IEEE754 standard. But since full length words make the function name too long and short versions are confusing, I will rename as you suggested.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From serb at openjdk.java.net  Tue Feb 15 05:44:10 2022
From: serb at openjdk.java.net (Sergey Bylokhov)
Date: Tue, 15 Feb 2022 05:44:10 GMT
Subject: RFR: 8281745: Create a regression test for JDK-4514331
In-Reply-To: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>
References: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>
Message-ID: 

On Tue, 15 Feb 2022 02:48:54 GMT, Manukumar V S  wrote:

> Create a regression test for JDK-4514331.
> It checks whether pressing 'Tab' key always shift focus to next component, even though the current focus is in JTextArea and some text is already selected.
> 
> Testing:
> I have verified this test with JDK 1.3.1 and JDK 1.4.1 .
> The issue is reproducible with JDK 1.3.1 and the test failed there, where the bug was originally reported and the test passed in JDK 1.4.1 where the issue was fixed.
> I have tested it in Linux, Mac and Windows platforms and it passed everywhere.

test/jdk/javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java line 72:

> 70:                 SwingUtilities.invokeAndWait(() -> {
> 71:                     setLookAndFeel(laf);
> 72:                     createUI();

I suggest calling waitForIdle after the window creation and before editor.getLocationOnScreen();

test/jdk/javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java line 75:

> 73:                 });
> 74:                 passed = false;
> 75:                 Point editorLoc = editor.getLocationOnScreen();

The editor is a Swing component, should be accessed on EDT.

test/jdk/javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java line 100:

> 98:         editor.setEditable(false);
> 99:         editor.requestFocusInWindow();
> 100:         panel.add(editor);

I am not sure that this will work all the time, the requestFocusInWindow(), see part of the spec:
>  * This component must be displayable, focusable, visible
    * and all of its ancestors (with the exception of the top-level
    * Window) must be visible for the request to be granted

-------------

PR: https://git.openjdk.java.net/jdk/pull/7469


From duke at openjdk.java.net  Tue Feb 15 06:01:46 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Tue, 15 Feb 2022 06:01:46 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v4]
In-Reply-To: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
Message-ID: 

> The primary API for image capture on modern Linuxes is `gdk_pixbuf_get_from_window()` that expects both coordinates and the size unscaled (i.e. not multiplied by the current desktop scale). At the same time, `gtk3_interface.c:gtk3_get_drawable_data()` gets the coordinates from `Robot` that pre-scales them (multiplying by the scale known to Java, however, not necessarily the current desktop scale). The problem with the size had been partly taken care of in [JDK-8225118](https://bugs.openjdk.java.net/browse/JDK-8225118), but coordinates are still passed to `gdk_pixbuf_get_from_window()` pre-scaled.
> 
> The idea of the fix is to capture a possibly larger area that is guaranteed to contain the one that is interesting to the caller and then only copy the interesting pixels to the output image. As a positive side effect, the size of the captured area cannot be less than 1x1 (provided the correct input, of course). This solves the problem of zero size passed to  `(*fp_gdk_pixbuf_get_from_drawable)` when the desktop scale is 3 and we're asked to capture just one pixel. In that case, the previous formula (`width / (float) win_scale + 0.5`) would have yielded `0`. 
> 
> A related issue would be that tests written specifically for this general area (`java/awt/Robot`) didn't catch this problem and only somewhat unrelated tests (`javax/swing/...`) were affected.
> 
> This one is solved by adding pixel-sized areas to the test image in `HiDPIRobotScreenCaptureTest.java`, which precise colors are then verified to match the expected ones. In addition to that, instead of verifying just the color of the center of a large area, 4 more pixels close to the area's border are checked. This helps to make sure that captured area coordinates aren't way off.
> 
> The tests under `javax/swing/...` that originally helped to identify this problem were modified to provide more screen space for painting their components as extreme desktop scaling (300%) on Ubuntu doesn't leave much room due to a humongous title bar.
> 
> The fix was tested by running all the modified tests on Ubuntu with desktop scaling set to 100%, 200%, and 300%. The `Robot` tests were also executed on Windows (300% scaling) and MacOS.

Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:

  Renamed scaling functions and updated copyright.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7425/files
  - new: https://git.openjdk.java.net/jdk/pull/7425/files/fc651add..4a8c20af

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7425&range=02-03

  Stats: 8 lines in 3 files changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7425.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7425/head:pull/7425

PR: https://git.openjdk.java.net/jdk/pull/7425


From duke at openjdk.java.net  Tue Feb 15 06:01:49 2022
From: duke at openjdk.java.net (Maxim Kartashev)
Date: Tue, 15 Feb 2022 06:01:49 GMT
Subject: RFR: 8280861: Robot color picker broken on Linux with scaling
 above 100% [v3]
In-Reply-To: <0yMXWGYN_p2SQbk8Yqer8hKkjNXRnxyzx-v1AsoeuOo=.92a7afdf-6f62-4216-9052-971fc3d896fc@github.com>
References: <7WQIrQr1kH9q7zlM2wZcrF7r-LX1uiQwYjN1TMovRds=.17e06f8b-1d83-42c4-8d38-6ccaeaacdc9e@github.com>
 
 <0yMXWGYN_p2SQbk8Yqer8hKkjNXRnxyzx-v1AsoeuOo=.92a7afdf-6f62-4216-9052-971fc3d896fc@github.com>
Message-ID: 

On Tue, 15 Feb 2022 00:43:42 GMT, Phil Race  wrote:

>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated copyright date in TestJProgressBarHighlightColor.java
>
> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2867:
> 
>> 2865: 
>> 2866: inline static int scale_down_to_plus_inf(int what, int scale) {
>> 2867:     return (int)ceilf(what / (float)scale);
> 
> I find the name of this and the companion function confusing.
> what is "inf" short for ? I see that and I think plus_infinity.
> scaled_ceiling and scaled_floor might be better names based on what I see.

@prrace The change has been made, please, take a look.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7425


From mvs at openjdk.java.net  Tue Feb 15 08:06:46 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Tue, 15 Feb 2022 08:06:46 GMT
Subject: RFR: 8281738: Create a regression test for checking the 'Space'
 key activation of focused Button [v2]
In-Reply-To: 
References: 
Message-ID: 

> This test verifies in all platforms and in all 'Look and Feels' that pressing the 'Space' key generates ActionEvent on focused Button or not.

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Fixed review comments: waitForIdle() added after frame creation and waits until button gains focus

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7460/files
  - new: https://git.openjdk.java.net/jdk/pull/7460/files/539b0eb8..eb6adc3d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7460&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7460&range=00-01

  Stats: 22 lines in 1 file changed: 19 ins; 1 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7460.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7460/head:pull/7460

PR: https://git.openjdk.java.net/jdk/pull/7460


From duke at openjdk.java.net  Tue Feb 15 08:32:10 2022
From: duke at openjdk.java.net (Tejesh R)
Date: Tue, 15 Feb 2022 08:32:10 GMT
Subject: RFR: 8236907: JTable added to nested panels does not paint last
 visible row
In-Reply-To: 
References: 
 
Message-ID: 

On Mon, 14 Feb 2022 06:53:18 GMT, Prasanta Sadhukhan  wrote:

>> Issue in painting last row of JTable due to decrement in `MaxRow `during computation. Differences in `MaxRow `computation between `TablePrintable` and `BasicTableUI `class. The Bug is fixed in both the classes. Test Case added to validate the same.
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java line 1903:
> 
>> 1901:     private void paintDropLines(Graphics g) {
>> 1902:         JTable.DropLocation loc = table.getDropLocation();
>> 1903:         if (loc == null) {
> 
> Deleting this seems to have regressed JDK-8081491 where 1 extra row is printed per page..
> jdk/test/java/awt/print/PageFormat/ImageableAreaTest.java is supposed to print 35 rows which was visible in console but it prints 36 rows..

The mentioned test computes 36 rows for frame height of 600 units. The 36th row is 18% visible in console and in printing its 100% visible. I have done the testing for the bug fix with an automated test case LastRowVisible.java and with the below test cases.
1. jdk/test/java/awt/print/PageFormat/ImageableAreaTest.java
2. jdk/test/javax/swing/JTable/LostTextTest.java
3. test/jdk/javax/swing/JTable/TestClearSel.java
The maxRow computations are just fine for console and printable views, the only thing is visibility of the same when setSize of frame is not a multiple of rowHeight of a table......

-------------

PR: https://git.openjdk.java.net/jdk/pull/7422


From mvs at openjdk.java.net  Tue Feb 15 08:49:54 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Tue, 15 Feb 2022 08:49:54 GMT
Subject: RFR: 8281745: Create a regression test for JDK-4514331 [v2]
In-Reply-To: 
References: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>
 
Message-ID: 

On Tue, 15 Feb 2022 05:38:38 GMT, Sergey Bylokhov  wrote:

>> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed review comments: frame created in EDT, waitForIdle() added after frame creation, editor access in EDT
>
> test/jdk/javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java line 100:
> 
>> 98:         editor.setEditable(false);
>> 99:         editor.requestFocusInWindow();
>> 100:         panel.add(editor);
> 
> I am not sure that this will work all the time, the requestFocusInWindow(), see part of the spec:
>>  * This component must be displayable, focusable, visible
>     * and all of its ancestors (with the exception of the top-level
>     * Window) must be visible for the request to be granted

I have moved the editor.requestFocusInWindow() call after frame.setVisible(true) and also even if this call is not honoured, the editor will get the focus as we are clicking on the editor (robot.mousePress) in runTest().

-------------

PR: https://git.openjdk.java.net/jdk/pull/7469


From mvs at openjdk.java.net  Tue Feb 15 08:49:54 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Tue, 15 Feb 2022 08:49:54 GMT
Subject: RFR: 8281745: Create a regression test for JDK-4514331 [v2]
In-Reply-To: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>
References: <7N5tuie0JMzT334ltsuqmHi4XFXG_uWX9HJSGON4bJk=.6f41cb4e-331b-46f5-ab8c-550edb51a99a@github.com>
Message-ID: 

> Create a regression test for JDK-4514331.
> It checks whether pressing 'Tab' key always shift focus to next component, even though the current focus is in JTextArea and some text is already selected.
> 
> Testing:
> I have verified this test with JDK 1.3.1 and JDK 1.4.1 .
> The issue is reproducible with JDK 1.3.1 and the test failed there, where the bug was originally reported and the test passed in JDK 1.4.1 where the issue was fixed.
> I have tested it in Linux, Mac and Windows platforms and it passed everywhere.

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Fixed review comments: frame created in EDT, waitForIdle() added after frame creation, editor access in EDT

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7469/files
  - new: https://git.openjdk.java.net/jdk/pull/7469/files/8ad19878..bc9bc1e9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7469&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7469&range=00-01

  Stats: 13 lines in 1 file changed: 8 ins; 2 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7469.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7469/head:pull/7469

PR: https://git.openjdk.java.net/jdk/pull/7469


From mvs at openjdk.java.net  Tue Feb 15 08:53:09 2022
From: mvs at openjdk.java.net (Manukumar V S)
Date: Tue, 15 Feb 2022 08:53:09 GMT
Subject: RFR: 8281738: Create a regression test for checking the 'Space'
 key activation of focused Button [v2]
In-Reply-To: <8RrJ1npXH7WIbx_4f6CKmNMb-kLGItFWEmyWELDtJyw=.02443c61-7916-4c15-b5dc-80c9527830be@github.com>
References: 
 <8RrJ1npXH7WIbx_4f6CKmNMb-kLGItFWEmyWELDtJyw=.02443c61-7916-4c15-b5dc-80c9527830be@github.com>
Message-ID: <9DLDva2eTEzTGRsrXfEtbAyk1uTKGh1PiPE57R5vSyQ=.6c6aa368-616e-495e-abda-18beb57c3a2a@github.com>

On Mon, 14 Feb 2022 23:24:23 GMT, Sergey Bylokhov  wrote:

>> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed review comments: waitForIdle() added after frame creation and waits until button gains focus
>
> test/jdk/javax/swing/JButton/SpaceKeyActivatesButton.java line 67:
> 
>> 65:                     createUI();
>> 66:                 });
>> 67: 
> 
> I think you should add robot.waitForIdle() after the frame creation, and also wait until the button will get a focus, since the "requestFocusInWindow" might be ignored.

Fixed it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7460


From dmarkov at openjdk.java.net  Tue Feb 15 09:30:12 2022
From: dmarkov at openjdk.java.net (Dmitry Markov)
Date: Tue, 15 Feb 2022 09:30:12 GMT
Subject: Integrated: 8281555: [macos] Get rid of deprecated Style Masks
 constants
In-Reply-To: 
References: 
Message-ID: 

On Wed, 9 Feb 2022 17:50:48 GMT, Dmitry Markov  wrote:

> The Style Masks constants [1], which are utilised by AWT, were deprecated starting from macOS 10.12 Sierra. It is high time to replace them with new constants introduced by NSWindowStyleMask enumeration [2].
> 
> [1] - https://developer.apple.com/documentation/appkit/nspanel/style_masks
> [2] - https://developer.apple.com/documentation/appkit/nswindowstylemask

This pull request has now been integrated.

Changeset: f82866bc
Author:    Dmitry Markov 
URL:       https://git.openjdk.java.net/jdk/commit/f82866bc79cbeeac23716fa6fadd4877f5d0a462
Stats:     22 lines in 5 files changed: 0 ins; 0 del; 22 mod

8281555: [macos] Get rid of deprecated Style Masks constants

Reviewed-by: serb, aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/7408


From prr at openjdk.java.net  Tue Feb 15 17:47:06 2022
From: prr at openjdk.java.net (Phil Race)
Date: Tue, 15 Feb 2022 17:47:06 GMT
Subject: RFR: 8012675: Javadoc for
 javax.swing.text.html.parser.Parser.handleComment() needs to be updated
In-Reply-To: 
References: 
Message-ID: 

On Fri, 11 Feb 2022 19:20:16 GMT, DamonGuy  wrote:

> Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc.

Do we have a test that proves what happens ?
I see the code you mention that logs an error but when I trace that it ends up in
handleError() which has an entirely commented out body. Whereas the bug report says that
the content of the script tag is displayed .. perhaps that latter part is true  ?

But I am also confused because I see :-

            if (recent == dtd.script) { // means: if after starting