From serb at openjdk.java.net Sun Nov 1 01:40:01 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 1 Nov 2020 01:40:01 GMT Subject: RFR: 6816284: Notepad class should be public Message-ID: <-sfkmJ1YkGLpYii3MGc7aRlWlMtFCYxWOxAlVU6ANBU=.a83b627b-03e2-49c7-a9a6-0db9850c2e77@github.com> The main class in the Notepad demo made public ------------- Commit messages: - Update Notepad.java Changes: https://git.openjdk.java.net/jdk/pull/980/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=980&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6816284 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/980.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/980/head:pull/980 PR: https://git.openjdk.java.net/jdk/pull/980 From serb at openjdk.java.net Sun Nov 1 01:47:53 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 1 Nov 2020 01:47:53 GMT Subject: RFR: 8233569: [TESTBUG] JTextComponent test bug6361367.java fails on macos In-Reply-To: References: Message-ID: On Sat, 31 Oct 2020 14:53:37 GMT, Prasanta Sadhukhan wrote: > Please review deproblemlisting an issue which is not failing in latest build. I have made the delay time consistent with other test. > Resultant test is green on all platforms for mach5 test run. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/977 From serb at openjdk.java.net Sun Nov 1 02:22:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 1 Nov 2020 02:22:59 GMT Subject: RFR: 8196302: javax/swing/JFileChooser/8041694/bug8041694.java In-Reply-To: References: Message-ID: On Sat, 31 Oct 2020 10:55:19 GMT, Prasanta Sadhukhan wrote: > Another one of timing issue in mach5 windows solved by adjusted timing in setAutoDelay() and added waitForIdle(). > Mach5 job has been run for several iterations in all platforms. Link in JBS. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/975 From psadhukhan at openjdk.java.net Sun Nov 1 15:49:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 1 Nov 2020 15:49:55 GMT Subject: Integrated: 8196302: javax/swing/JFileChooser/8041694/bug8041694.java In-Reply-To: References: Message-ID: <4zCHgLfM4k5rgAMjrYoBM_Hx-cLl3cx4Os4f3BQGeiM=.e978ab6a-e6d4-47ba-a9c7-102bd26067fb@github.com> On Sat, 31 Oct 2020 10:55:19 GMT, Prasanta Sadhukhan wrote: > Another one of timing issue in mach5 windows solved by adjusted timing in setAutoDelay() and added waitForIdle(). > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: 4c4b8f4d Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/4c4b8f4d Stats: 6 lines in 2 files changed: 4 ins; 2 del; 0 mod 8196302: javax/swing/JFileChooser/8041694/bug8041694.java Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/975 From psadhukhan at openjdk.java.net Sun Nov 1 15:54:54 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 1 Nov 2020 15:54:54 GMT Subject: Integrated: 8233569: [TESTBUG] JTextComponent test bug6361367.java fails on macos In-Reply-To: References: Message-ID: <_jbM73UZWvbuEY3xGPDKciQ0FqfQyv1VGHFhdT_jiOk=.7badbc05-7f85-4e8b-8385-c2f0e689f9ca@github.com> On Sat, 31 Oct 2020 14:53:37 GMT, Prasanta Sadhukhan wrote: > Please review deproblemlisting an issue which is not failing in latest build. I have made the delay time consistent with other test. > Resultant test is green on all platforms for mach5 test run. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: 518ff518 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/518ff518 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod 8233569: [TESTBUG] JTextComponent test bug6361367.java fails on macos Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/977 From psadhukhan at openjdk.java.net Sun Nov 1 17:38:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 1 Nov 2020 17:38:55 GMT Subject: Withdrawn: 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux In-Reply-To: <0IUGO16kg8kZIXSq8lq4M1HPiK82nT78hnrooodrpJk=.fa0f4226-617f-4ce2-a3cd-07b2d1fd3fa5@github.com> References: <0IUGO16kg8kZIXSq8lq4M1HPiK82nT78hnrooodrpJk=.fa0f4226-617f-4ce2-a3cd-07b2d1fd3fa5@github.com> Message-ID: On Fri, 23 Oct 2020 09:50:37 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for an issue seen to be failing in mach5 testing on linux whereby the combo popup is not opening. > The issue is not reproducible locally in ubuntu18.04 but mach5 testing on ubuntu18.04 was able to see the issue. > Combo popup was opened by clicking at right edge of combo box, which sometimes is not set properly at mach5 system, so mouse click is clicked at wrong location of frame, thereby not opening the combo popup. > Modified the test to open the combo popup by clicking on middle of combobox which now works for all. Also, made robot autodelay consistent with other test to be 100ms. Also, changed deprecated constant to appropriate constants. > Mach5 job was run for several iteration on all 3 platforms. Link in JBS This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/829 From pbansal at openjdk.java.net Sun Nov 1 17:50:00 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Sun, 1 Nov 2020 17:50:00 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated Message-ID: The manual test creates a JTabbedPane and add tabs with text with different html styles. For the tab with text "big", a bigger text size is used and it is expected that this should result in making the tab height bigger. For AquaLookAndFeel, inside class AquaJTabbedPaneUI and AquaTabbedPaneCopyFromBasicUI, the tabs height is constraint and there is upper/lower limit set for tab height. So the tab height is less than expected and the text looks truncated. I do not see this issue in other L&Fs. It looks like this is done deliberately for AquaL&F and this is not a bug. but the test instructions do not specify this and result in confusion. So updating the test instructions to specify that the text "big" may be truncated in MacOS. ------------- Commit messages: - Remove test from ProblemList - 8251177: [macosx] The text big is truncated Changes: https://git.openjdk.java.net/jdk/pull/984/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=984&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8251177 Stats: 4 lines in 2 files changed: 2 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/984.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/984/head:pull/984 PR: https://git.openjdk.java.net/jdk/pull/984 From serb at openjdk.java.net Sun Nov 1 23:20:04 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 1 Nov 2020 23:20:04 GMT Subject: RFR: 7124397: [macosx] JSpinner serialiazation - deserialization issue Message-ID: The serialization was broken because different listeners are leaked in the case of compound components. That listeners also caused memory leaks which were fixed by a few fixes here and there, and in jdk16 the serialization start to work fine. But I would like to contribute the test which will prove that serialization works fine. ------------- Commit messages: - Create SerializationTest.java Changes: https://git.openjdk.java.net/jdk/pull/989/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=989&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-7124397 Stats: 77 lines in 1 file changed: 77 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/989.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/989/head:pull/989 PR: https://git.openjdk.java.net/jdk/pull/989 From serb at openjdk.java.net Mon Nov 2 00:00:53 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 00:00:53 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated In-Reply-To: References: Message-ID: On Sun, 1 Nov 2020 17:21:58 GMT, Pankaj Bansal wrote: > The manual test creates a JTabbedPane and add tabs with text with different html styles. For the tab with text "big", a bigger text size is used and it is expected that this should result in making the tab height bigger. > > For AquaLookAndFeel, inside class AquaJTabbedPaneUI and AquaTabbedPaneCopyFromBasicUI, the tabs height is constraint and there is upper/lower limit set for tab height. So the tab height is less than expected and the text looks truncated. I do not see this issue in other L&Fs. > > It looks like this is done deliberately for AquaL&F and this is not a bug. but the test instructions do not specify this and result in confusion. So updating the test instructions to specify that the text "big" may be truncated in MacOS. Probably it is better to limit the size of the font? ------------- PR: https://git.openjdk.java.net/jdk/pull/984 From jdv at openjdk.java.net Mon Nov 2 03:41:59 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 03:41:59 GMT Subject: RFR: 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos In-Reply-To: References: Message-ID: On Thu, 29 Oct 2020 23:26:58 GMT, Sergey Bylokhov wrote: >> Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. >> Modified the test to added delay() after frame is made visible and moved the frame to centre of screen to be consistent with other tests. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Please ask @jayathirthrao, who was able to reproduce this bug on the local system, about approval. I tested with or without fix in my local system with all the settings that we do for jtreg tests but still it fails in my system. Someone else with 10.15 please verify the behaviour or we can say that it passes in our CI system and there is some specific issue with my system. ------------- PR: https://git.openjdk.java.net/jdk/pull/926 From jdv at openjdk.java.net Mon Nov 2 03:42:00 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 03:42:00 GMT Subject: RFR: 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos In-Reply-To: References: Message-ID: <_v3_R5wapLw6flxbFG0L1m-PWKgwy8WQntLr02Lspbo=.82613709-50bd-40db-bfef-321424063820@github.com> On Thu, 29 Oct 2020 05:36:47 GMT, Sergey Bylokhov wrote: >> Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. >> Modified the test to modify setAutoDelay() time, added delay() after frame is made visible and moved the frame to centre of screen. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Please ask @jayathirthrao, who was able to reproduce this bug on the local system, about approval. I tested with or without fix in my local system with all the settings that we do for jtreg tests but still it fails in my system. Someone else with 10.15 please verify the behaviour or we can say that it passes in our CI system and there is some specific issue with my system. ------------- PR: https://git.openjdk.java.net/jdk/pull/922 From psadhukhan at openjdk.java.net Mon Nov 2 08:28:01 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 2 Nov 2020 08:28:01 GMT Subject: RFR: 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument Message-ID: <0z1N6lTLhz_Jdd5tjzzGbnwSaTz2__iNF9_-G1bT2Rw=.90867000-46cb-44d9-a291-9d614f0e3e9b@github.com> Since HTML4 support has been dropped from javadoc by JDK-8187793. HTMLDocument.java containing the valign attribute in the table element, `valign="top"` needs to be replaced with `style="vertical-align:top" ------------- Commit messages: - 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument Changes: https://git.openjdk.java.net/jdk/pull/995/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=995&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255215 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/995.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/995/head:pull/995 PR: https://git.openjdk.java.net/jdk/pull/995 From serb at openjdk.java.net Mon Nov 2 08:38:54 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 08:38:54 GMT Subject: RFR: 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument In-Reply-To: <0z1N6lTLhz_Jdd5tjzzGbnwSaTz2__iNF9_-G1bT2Rw=.90867000-46cb-44d9-a291-9d614f0e3e9b@github.com> References: <0z1N6lTLhz_Jdd5tjzzGbnwSaTz2__iNF9_-G1bT2Rw=.90867000-46cb-44d9-a291-9d614f0e3e9b@github.com> Message-ID: On Mon, 2 Nov 2020 08:18:44 GMT, Prasanta Sadhukhan wrote: > Since HTML4 support has been dropped from javadoc by JDK-8187793. > HTMLDocument.java containing the valign attribute in the table element, `valign="top"` > needs to be replaced with `style="vertical-align:top" Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/995 From jdv at openjdk.java.net Mon Nov 2 10:35:55 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 10:35:55 GMT Subject: RFR: 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos In-Reply-To: References: Message-ID: On Thu, 29 Oct 2020 05:09:24 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. > Modified the test to modify setAutoDelay() time, added delay() after frame is made visible and moved the frame to centre of screen. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/922 From jdv at openjdk.java.net Mon Nov 2 10:35:56 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 10:35:56 GMT Subject: RFR: 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos In-Reply-To: <_v3_R5wapLw6flxbFG0L1m-PWKgwy8WQntLr02Lspbo=.82613709-50bd-40db-bfef-321424063820@github.com> References: <_v3_R5wapLw6flxbFG0L1m-PWKgwy8WQntLr02Lspbo=.82613709-50bd-40db-bfef-321424063820@github.com> Message-ID: On Mon, 2 Nov 2020 03:39:18 GMT, Jayathirth D V wrote: >> Please ask @jayathirthrao, who was able to reproduce this bug on the local system, about approval. > > I tested with or without fix in my local system with all the settings that we do for jtreg tests but still it fails in my system. > Someone else with 10.15 please verify the behaviour or we can say that it passes in our CI system and there is some specific issue with my system. If we dont give permission for "terminal" to control the computer in System Preferences -> Security & Privacy -> Privacy -> Accessibility i see that the test fails. After enabling it i see that test passes without fix also. Looks like it was issue related to some settings. Present change looks like some common test refactoring. ------------- PR: https://git.openjdk.java.net/jdk/pull/922 From jdv at openjdk.java.net Mon Nov 2 10:37:03 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 10:37:03 GMT Subject: RFR: 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos In-Reply-To: References: Message-ID: <2L86Qpl14smvViMCy0MGCVUpUzmJs8qIpwu004FPXjQ=.f0fae02f-d073-4a30-be8c-378da4ecda5e@github.com> On Mon, 2 Nov 2020 03:39:31 GMT, Jayathirth D V wrote: >> Please ask @jayathirthrao, who was able to reproduce this bug on the local system, about approval. > > I tested with or without fix in my local system with all the settings that we do for jtreg tests but still it fails in my system. > Someone else with 10.15 please verify the behaviour or we can say that it passes in our CI system and there is some specific issue with my system. If we dont give permission for "terminal" to control the computer in System Preferences -> Security & Privacy -> Privacy -> Accessibility i see that the test fails. After enabling it i see that test passes without fix also. Looks like it was issue related to some settings. Present change looks like some common test refactoring. ------------- PR: https://git.openjdk.java.net/jdk/pull/926 From jdv at openjdk.java.net Mon Nov 2 10:37:01 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 2 Nov 2020 10:37:01 GMT Subject: RFR: 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos In-Reply-To: References: Message-ID: <9XytgKO4MkJ7QFUAVelz8bRLr5mD2oMnVIpSePiQLtE=.855c637d-6805-4e3a-938b-f728389ee392@github.com> On Thu, 29 Oct 2020 09:21:04 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. > Modified the test to added delay() after frame is made visible and moved the frame to centre of screen to be consistent with other tests. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/926 From psadhukhan at openjdk.java.net Mon Nov 2 10:44:04 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 2 Nov 2020 10:44:04 GMT Subject: Integrated: 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos In-Reply-To: References: Message-ID: On Thu, 29 Oct 2020 05:09:24 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. > Modified the test to modify setAutoDelay() time, added delay() after frame is made visible and moved the frame to centre of screen. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: e97809d3 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/e97809d3 Stats: 8 lines in 2 files changed: 4 ins; 4 del; 0 mod 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/922 From psadhukhan at openjdk.java.net Mon Nov 2 10:44:05 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 2 Nov 2020 10:44:05 GMT Subject: Integrated: 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos In-Reply-To: References: Message-ID: On Thu, 29 Oct 2020 09:21:04 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for a test issue seen to be failing on mach5 macos systems due to timing issue. > Modified the test to added delay() after frame is made visible and moved the frame to centre of screen to be consistent with other tests. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: 98c91b64 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/98c91b64 Stats: 6 lines in 2 files changed: 3 ins; 1 del; 2 mod 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/926 From pbansal at openjdk.java.net Mon Nov 2 10:46:08 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 10:46:08 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated [v2] In-Reply-To: References: Message-ID: <6ivHhPE02egllHHKmsv57OrC-W5h8AujU03sgrG5u5I=.3e858a0f-a451-4b90-a445-53b6b1d39b1b@github.com> > The manual test creates a JTabbedPane and add tabs with text with different html styles. For the tab with text "big", a bigger text size is used and it is expected that this should result in making the tab height bigger. > > For AquaLookAndFeel, inside class AquaJTabbedPaneUI and AquaTabbedPaneCopyFromBasicUI, the tabs height is constraint and there is upper/lower limit set for tab height. So the tab height is less than expected and the text looks truncated. I do not see this issue in other L&Fs. > > It looks like this is done deliberately for AquaL&F and this is not a bug. but the test instructions do not specify this and result in confusion. So updating the test instructions to specify that the text "big" may be truncated in MacOS. Pankaj Bansal has updated the pull request incrementally with one additional commit since the last revision: Fixing review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/984/files - new: https://git.openjdk.java.net/jdk/pull/984/files/e6e441e3..206a5db0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=984&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=984&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/984.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/984/head:pull/984 PR: https://git.openjdk.java.net/jdk/pull/984 From pbansal at openjdk.java.net Mon Nov 2 10:52:05 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 10:52:05 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated In-Reply-To: References: Message-ID: On Sun, 1 Nov 2020 23:58:04 GMT, Sergey Bylokhov wrote: > Probably it is better to limit the size of the font? Ok, I have reduced the font size. Now the text size if such that it is bigger than other texts, but text would fit within the tab height and text is not truncated. ------------- PR: https://git.openjdk.java.net/jdk/pull/984 From pbansal at openjdk.java.net Mon Nov 2 11:04:00 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 11:04:00 GMT Subject: RFR: 7124397: [macosx] JSpinner serialiazation - deserialization issue In-Reply-To: References: Message-ID: On Sun, 1 Nov 2020 23:12:10 GMT, Sergey Bylokhov wrote: > The serialization was broken because different listeners are leaked in the case of compound components. > That listeners also caused memory leaks which were fixed by a few fixes here and there, and in jdk16 the serialization start to work fine. But I would like to contribute the test which will prove that serialization works fine. test/jdk/javax/swing/JSpinner/SerializationTest.java line 40: > 38: /** > 39: * @test > 40: * @bug 7124397 Can we add a @summary tag here to give small summary about the purpose of test? ------------- PR: https://git.openjdk.java.net/jdk/pull/989 From pbansal at openjdk.java.net Mon Nov 2 11:07:04 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 11:07:04 GMT Subject: RFR: 6816284: Notepad class should be public In-Reply-To: <-sfkmJ1YkGLpYii3MGc7aRlWlMtFCYxWOxAlVU6ANBU=.a83b627b-03e2-49c7-a9a6-0db9850c2e77@github.com> References: <-sfkmJ1YkGLpYii3MGc7aRlWlMtFCYxWOxAlVU6ANBU=.a83b627b-03e2-49c7-a9a6-0db9850c2e77@github.com> Message-ID: On Sun, 1 Nov 2020 01:30:46 GMT, Sergey Bylokhov wrote: > The main class in the Notepad demo made public Marked as reviewed by pbansal (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/980 From serb at openjdk.java.net Mon Nov 2 11:18:55 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 11:18:55 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 10:49:00 GMT, Pankaj Bansal wrote: >> Probably it is better to limit the size of the font? > >> Probably it is better to limit the size of the font? > > Ok, I have reduced the font size. Now the text size if such that it is bigger than other texts, but text would fit within the tab height and text is not truncated. I meant to limit the font size in the tab-pane. ------------- PR: https://git.openjdk.java.net/jdk/pull/984 From serb at openjdk.java.net Mon Nov 2 11:56:13 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 11:56:13 GMT Subject: RFR: 7124397: [macosx] JSpinner serialiazation - deserialization issue [v2] In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 11:00:48 GMT, Pankaj Bansal wrote: >> Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: >> >> the summary is added to the test > > test/jdk/javax/swing/JSpinner/SerializationTest.java line 40: > >> 38: /** >> 39: * @test >> 40: * @bug 7124397 > > Can we add a @summary tag here to give small summary about the purpose of test? fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/989 From serb at openjdk.java.net Mon Nov 2 11:56:12 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 11:56:12 GMT Subject: RFR: 7124397: [macosx] JSpinner serialiazation - deserialization issue [v2] In-Reply-To: References: Message-ID: > The serialization was broken because different listeners are leaked in the case of compound components. > That listeners also caused memory leaks which were fixed by a few fixes here and there, and in jdk16 the serialization start to work fine. But I would like to contribute the test which will prove that serialization works fine. Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: the summary is added to the test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/989/files - new: https://git.openjdk.java.net/jdk/pull/989/files/061014c4..14615927 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=989&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=989&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/989.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/989/head:pull/989 PR: https://git.openjdk.java.net/jdk/pull/989 From pbansal at openjdk.java.net Mon Nov 2 11:59:56 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 11:59:56 GMT Subject: RFR: 7124397: [macosx] JSpinner serialiazation - deserialization issue [v2] In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 11:56:12 GMT, Sergey Bylokhov wrote: >> The serialization was broken because different listeners are leaked in the case of compound components. >> That listeners also caused memory leaks which were fixed by a few fixes here and there, and in jdk16 the serialization start to work fine. But I would like to contribute the test which will prove that serialization works fine. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > the summary is added to the test Marked as reviewed by pbansal (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/989 From pbansal at openjdk.java.net Mon Nov 2 12:13:53 2020 From: pbansal at openjdk.java.net (Pankaj Bansal) Date: Mon, 2 Nov 2020 12:13:53 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 11:16:32 GMT, Sergey Bylokhov wrote: > I meant to limit the font size in the tab-pane. ok, just for clarification, you mean this should be fixed as product bug not test issue? We should limit the font size in AquaJTabbedPaneUI, so that the text is not truncated? ------------- PR: https://git.openjdk.java.net/jdk/pull/984 From serb at openjdk.java.net Mon Nov 2 12:19:55 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 12:19:55 GMT Subject: RFR: 8251177: [macosx] The text "big" is truncated In-Reply-To: References: Message-ID: <3h0puHJzh5Vgc-9wmgtsBjlqoW3mjnBcZxb88rtavMk=.58b41239-b47a-4f69-8864-cec09a36263b@github.com> On Mon, 2 Nov 2020 12:11:34 GMT, Pankaj Bansal wrote: > > I meant to limit the font size in the tab-pane. > > ok, just for clarification, you mean this should be fixed as product bug not test issue? We should limit the font size in AquaJTabbedPaneUI, so that the text is not truncated? Yes something like that in the JDK itself, I remember that menu items in the menubar on windows behave in a similar way, ignore the font size bigger some value. ------------- PR: https://git.openjdk.java.net/jdk/pull/984 From serb at openjdk.java.net Mon Nov 2 12:21:58 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 12:21:58 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac In-Reply-To: References: Message-ID: On Sat, 31 Oct 2020 11:06:52 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 55: >> >>> 53: * @build Util >>> 54: * @build ExtendedRobot >>> 55: * @run main/othervm -Dsun.java2d.uiScale=1 bug7154030 >> >> The "sun.java2d.uiScale" does not affect the sizes of the frame on macOS, Is it possible that it was reported on HiDPI screen macOS? > > It was reported in macmini (probably connect to hidpi screen) and iMac (I guess having hidpi screen). > Also, I have seen mach5 job failing on windows too. > I have posted failing mach5 jobs in JBS. Then please double-check that the test will pass after the fix on HiDPI screen. Not sure that -Dsun.java2d.uiScale=1 affects such usecase. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Mon Nov 2 12:30:10 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 12:30:10 GMT Subject: Integrated: 7124397: [macosx] JSpinner serialiazation - deserialization issue In-Reply-To: References: Message-ID: On Sun, 1 Nov 2020 23:12:10 GMT, Sergey Bylokhov wrote: > The serialization was broken because different listeners are leaked in the case of compound components. > That listeners also caused memory leaks which were fixed by a few fixes here and there, and in jdk16 the serialization start to work fine. But I would like to contribute the test which will prove that serialization works fine. This pull request has now been integrated. Changeset: eb66418b Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/eb66418b Stats: 78 lines in 1 file changed: 78 ins; 0 del; 0 mod 7124397: [macosx] JSpinner serialiazation - deserialization issue Reviewed-by: pbansal ------------- PR: https://git.openjdk.java.net/jdk/pull/989 From serb at openjdk.java.net Mon Nov 2 12:33:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 2 Nov 2020 12:33:59 GMT Subject: Integrated: 6816284: Notepad class should be public In-Reply-To: <-sfkmJ1YkGLpYii3MGc7aRlWlMtFCYxWOxAlVU6ANBU=.a83b627b-03e2-49c7-a9a6-0db9850c2e77@github.com> References: <-sfkmJ1YkGLpYii3MGc7aRlWlMtFCYxWOxAlVU6ANBU=.a83b627b-03e2-49c7-a9a6-0db9850c2e77@github.com> Message-ID: On Sun, 1 Nov 2020 01:30:46 GMT, Sergey Bylokhov wrote: > The main class in the Notepad demo made public This pull request has now been integrated. Changeset: ceab9f32 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/ceab9f32 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 6816284: Notepad class should be public Reviewed-by: pbansal ------------- PR: https://git.openjdk.java.net/jdk/pull/980 From psadhukhan at openjdk.java.net Mon Nov 2 12:52:58 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 2 Nov 2020 12:52:58 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 12:19:06 GMT, Sergey Bylokhov wrote: >> It was reported in macmini (probably connect to hidpi screen) and iMac (I guess having hidpi screen). >> Also, I have seen mach5 job failing on windows too. >> I have posted failing mach5 jobs in JBS. > > Then please double-check that the test will pass after the fix on HiDPI screen. Not sure that -Dsun.java2d.uiScale=1 affects such usecase. Since mach5 systems are mostly macmini, where it initially failed, and the resultant test is passing on them, I would hope they will pass on hidpi screen they are connected to. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Mon Nov 2 12:54:01 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 2 Nov 2020 12:54:01 GMT Subject: RFR: 8196089: javax/swing/Action/8133039/bug8133039.java fails In-Reply-To: References: Message-ID: On Fri, 30 Oct 2020 10:41:36 GMT, Prasanta Sadhukhan wrote: >> Deproblemlisted test > > any comment on this review? ping? ------------- PR: https://git.openjdk.java.net/jdk/pull/929 From prr at openjdk.java.net Mon Nov 2 15:35:54 2020 From: prr at openjdk.java.net (Phil Race) Date: Mon, 2 Nov 2020 15:35:54 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 12:50:22 GMT, Prasanta Sadhukhan wrote: >> Then please double-check that the test will pass after the fix on HiDPI screen. Not sure that -Dsun.java2d.uiScale=1 affects such usecase. > > Since mach5 systems are mostly macmini, where it initially failed, and the resultant test is passing on them, I would hope they will pass on hidpi screen they are connected to. The mach5 macOS test systems currently have ZERO hidpi monitors. I think they are all 1920x1080 non-retina. They only ever had at most one and that was because it was accidentally connected that way after a lab move. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From jdv at openjdk.java.net Tue Nov 3 03:12:55 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 03:12:55 GMT Subject: RFR: 8196089: javax/swing/Action/8133039/bug8133039.java fails In-Reply-To: References: Message-ID: On Thu, 29 Oct 2020 12:11:33 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for an issue seen to be failing on mach5 systems due to timing issue. > Adjusted the autoDelay time and moved the frame to center of screen. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/929 From jdv at openjdk.java.net Tue Nov 3 03:12:56 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 03:12:56 GMT Subject: RFR: 8196089: javax/swing/Action/8133039/bug8133039.java fails In-Reply-To: References: Message-ID: On Mon, 2 Nov 2020 12:50:33 GMT, Prasanta Sadhukhan wrote: >> any comment on this review? > > ping? Looks like this is also related to giving permission to terminal in System Preferences -> Security & Privacy -> Privacy -> Accessibility. If we dont give permission the test fails. ------------- PR: https://git.openjdk.java.net/jdk/pull/929 From psadhukhan at openjdk.java.net Tue Nov 3 03:20:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 03:20:55 GMT Subject: Integrated: 8196089: javax/swing/Action/8133039/bug8133039.java fails In-Reply-To: References: Message-ID: <177vZA71kfX6F4HYBciANONnC7DV0wLrWwmM_w2wUuQ=.dcdb84c5-3dcd-44fb-a750-b58191769c09@github.com> On Thu, 29 Oct 2020 12:11:33 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for an issue seen to be failing on mach5 systems due to timing issue. > Adjusted the autoDelay time and moved the frame to center of screen. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: fe4e6b3e Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/fe4e6b3e Stats: 3 lines in 2 files changed: 1 ins; 1 del; 1 mod 8196089: javax/swing/Action/8133039/bug8133039.java fails Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/929 From jdv at openjdk.java.net Tue Nov 3 05:57:04 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 05:57:04 GMT Subject: RFR: 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos Message-ID: This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. ------------- Commit messages: - 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos Changes: https://git.openjdk.java.net/jdk/pull/1027/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1027&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8233561 Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1027.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1027/head:pull/1027 PR: https://git.openjdk.java.net/jdk/pull/1027 From jdv at openjdk.java.net Tue Nov 3 06:19:00 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 06:19:00 GMT Subject: RFR: 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS Message-ID: This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. ------------- Commit messages: - 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS Changes: https://git.openjdk.java.net/jdk/pull/1028/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1028&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8233562 Stats: 4 lines in 2 files changed: 1 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1028.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1028/head:pull/1028 PR: https://git.openjdk.java.net/jdk/pull/1028 From psadhukhan at openjdk.java.net Tue Nov 3 06:37:59 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 06:37:59 GMT Subject: RFR: 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 05:48:13 GMT, Jayathirth D V wrote: > This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. > > I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1027 From psadhukhan at openjdk.java.net Tue Nov 3 06:40:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 06:40:55 GMT Subject: RFR: 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 06:09:51 GMT, Jayathirth D V wrote: > This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. > > I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1028 From jdv at openjdk.java.net Tue Nov 3 06:42:58 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 06:42:58 GMT Subject: Integrated: 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 05:48:13 GMT, Jayathirth D V wrote: > This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. > > I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. This pull request has now been integrated. Changeset: 9beb866b Author: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/9beb866b Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/1027 From jdv at openjdk.java.net Tue Nov 3 07:23:07 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 07:23:07 GMT Subject: RFR: 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS [v2] In-Reply-To: References: Message-ID: > This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. > > I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. Jayathirth D V has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge master - 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS ------------- Changes: https://git.openjdk.java.net/jdk/pull/1028/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1028&range=01 Stats: 4 lines in 2 files changed: 1 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1028.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1028/head:pull/1028 PR: https://git.openjdk.java.net/jdk/pull/1028 From jdv at openjdk.java.net Tue Nov 3 07:56:58 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 3 Nov 2020 07:56:58 GMT Subject: Integrated: 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 06:09:51 GMT, Jayathirth D V wrote: > This issue is related to not giving permission for terminal to control things in System Preferences -> Security & privacy -> Privacy -> Accessibility. > > I have verified the test in our CI and removed it from problemlist. There are small tweaks in test also. This pull request has now been integrated. Changeset: 4107670d Author: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/4107670d Stats: 4 lines in 2 files changed: 1 ins; 2 del; 1 mod 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/1028 From kizune at openjdk.java.net Tue Nov 3 10:43:11 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 3 Nov 2020 10:43:11 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Message-ID: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper ------------- Commit messages: - 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper - Merge pull request #1 from openjdk/master Changes: https://git.openjdk.java.net/jdk/pull/1035/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1035&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-4907798 Stats: 183 lines in 3 files changed: 181 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1035.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1035/head:pull/1035 PR: https://git.openjdk.java.net/jdk/pull/1035 From psadhukhan at openjdk.java.net Tue Nov 3 16:32:07 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 16:32:07 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: Message-ID: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Remove uiScale ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/955/files - new: https://git.openjdk.java.net/jdk/pull/955/files/f3f9f9ff..b6a90f1d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=00-01 Stats: 13 lines in 1 file changed: 5 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/955.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/955/head:pull/955 PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Tue Nov 3 16:34:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 16:34:55 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac In-Reply-To: References: Message-ID: <85lu6YRxFTjWtBtqc4EFEhs9GkGkon24PhDv82n3uhQ=.f428e5e9-7568-4b07-b592-7ab9a6d7a49e@github.com> On Fri, 30 Oct 2020 11:42:53 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Removed uiScale and move frame from (0,0) location to about mid-screen and made sure robot screenCapture also captures the frame from that location. mach5 iterations is green. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Tue Nov 3 16:46:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 3 Nov 2020 16:46:55 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper In-Reply-To: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 10:32:01 GMT, Alexander Zuev wrote: > 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper I think even if the fix is in windows, there's no harm in making the test platform agnostic and let it run for all platforms. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From serb at openjdk.java.net Tue Nov 3 17:44:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 3 Nov 2020 17:44:59 GMT Subject: RFR: 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS [v2] In-Reply-To: References: Message-ID: <1_Du3nFctK5JfOYRLF5YUPIT6fdL0BuqvPBw0zXbyHA=.25590e93-2430-4c30-9f29-19e3e3523f32@github.com> On Tue, 3 Nov 2020 06:38:23 GMT, Prasanta Sadhukhan wrote: >> Jayathirth D V has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: >> >> - Merge master >> - 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS > > Marked as reviewed by psadhukhan (Reviewer). I suggest to check all bugs filed at the previouse sprint, caused by the system config and fix them at onece, like https://github.com/openjdk/jdk/pull/895 https://github.com/openjdk/jdk/pull/733 ------------- PR: https://git.openjdk.java.net/jdk/pull/1028 From serb at openjdk.java.net Tue Nov 3 18:41:06 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 3 Nov 2020 18:41:06 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 16:32:07 GMT, Prasanta Sadhukhan wrote: >> Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. >> Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Remove uiScale test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 96: > 94: locx = screenSize.width/2; > 95: locy = screenSize.height/2; > 96: frame.setLocation(locx, locy); To move it to the center you can use, setLocationRelativeTo(null) and you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS) ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Tue Nov 3 18:49:02 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 3 Nov 2020 18:49:02 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper In-Reply-To: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 10:32:01 GMT, Alexander Zuev wrote: > 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Changes requested by serb (Reviewer). test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 100: > 98: } > 99: robot.waitForIdle(); > 100: robot.keyPress(KeyEvent.VK_ALT); Can we skip the robot interaction and instead show the popup menu ourselves? (not via menu items) test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 57: > 55: try { > 56: // Set system look and feel > 57: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); I suggest checking all installed L&Fs for example https://github.com/openjdk/jdk/pull/989/files test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 89: > 87: for(int i=0; i<3; i++) { > 88: try { > 89: ArrayList gc = new ArrayList(); It will be useful to call System.gc() and limit the size of the heap via -mx src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java line 1229: > 1227: // and uninstall menu keybindings > 1228: removeItems(); > 1229: menuInputMap = null; Just curious, will the uninstall(); at the start of the method will clear this flag as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From psadhukhan at openjdk.java.net Wed Nov 4 02:44:58 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 4 Nov 2020 02:44:58 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: Message-ID: On Tue, 3 Nov 2020 18:38:15 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove uiScale > > test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 96: > >> 94: locx = screenSize.width/2; >> 95: locy = screenSize.height/2; >> 96: frame.setLocation(locx, locy); > > To move it to the center you can use, setLocationRelativeTo(null) and you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS) I know setLocationRelativeTo(null) will move to center of screen but I needed the coordinate for robot interaction. The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Wed Nov 4 06:23:54 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 4 Nov 2020 06:23:54 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: Message-ID: On Wed, 4 Nov 2020 02:42:16 GMT, Prasanta Sadhukhan wrote: > The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen You can use locx/loxy intentionally to move the window, but you can't use it in a robot because of: > you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS) ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Wed Nov 4 13:14:03 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 4 Nov 2020 13:14:03 GMT Subject: Integrated: 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument In-Reply-To: <0z1N6lTLhz_Jdd5tjzzGbnwSaTz2__iNF9_-G1bT2Rw=.90867000-46cb-44d9-a291-9d614f0e3e9b@github.com> References: <0z1N6lTLhz_Jdd5tjzzGbnwSaTz2__iNF9_-G1bT2Rw=.90867000-46cb-44d9-a291-9d614f0e3e9b@github.com> Message-ID: On Mon, 2 Nov 2020 08:18:44 GMT, Prasanta Sadhukhan wrote: > Since HTML4 support has been dropped from javadoc by JDK-8187793. > HTMLDocument.java containing the valign attribute in the table element, `valign="top"` > needs to be replaced with `style="vertical-align:top" This pull request has now been integrated. Changeset: 7f4d873d Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/7f4d873d Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/995 From psadhukhan at openjdk.java.net Wed Nov 4 14:38:06 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 4 Nov 2020 14:38:06 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v3] In-Reply-To: References: Message-ID: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: use getBounds() ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/955/files - new: https://git.openjdk.java.net/jdk/pull/955/files/b6a90f1d..cf936ae0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=01-02 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/955.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/955/head:pull/955 PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Wed Nov 4 14:38:07 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 4 Nov 2020 14:38:07 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: Message-ID: <6aMgUbkf3sKP69rM4mbfJBuMe845Et7jc_8pmRr-7gE=.88219b1a-ece0-4e04-886b-bacfdd4b119a@github.com> On Wed, 4 Nov 2020 06:21:26 GMT, Sergey Bylokhov wrote: >> I know setLocationRelativeTo(null) will move to center of screen but I needed the coordinate for robot interaction. >> The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen > >> The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen > > You can use locx/loxy intentionally to move the window, but you can't use it in a robot because of: >> you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS) Modified to use bounds. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Thu Nov 5 03:58:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 5 Nov 2020 03:58:55 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: <_nj2FwAXWLqsE2I79uXTwcrlGQ58fiVDRoieoLUmwEo=.6f136cb8-3059-4186-9494-3c0f1c4e8c45@github.com> Message-ID: On Sat, 10 Oct 2020 11:33:57 GMT, Sergey Bylokhov wrote: >> I tried following testcase snippet >> ``` >> JRootPane r = new JRootPane(); >> JFrame f = new JFrame(); >> f.getRootPane().setUI(new MetalRootPaneUI()); >> f.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); >> f.getRootPane().getUI().installUI(r); >> r.getContentPane().add(new JLabel("foo")); >> System.out.println("Preferred Size: " + r.getPreferredSize()); >> but it uses JRootPane.RootLayout layout manager and not MetalRootLayout so it calls Rootlayout.preferredLayoutSize and not MetalRootLayout.preferredlayoutSize > > You need to set decorations for the root pane: > UIManager.setLookAndFeel(new MetalLookAndFeel()); > JFrame frame = new JFrame(); > frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); > frame.pack(); > System.out.println("Layout: " + frame.getRootPane().getLayout()); > ======== > Layout: javax.swing.plaf.metal.MetalRootPaneUI$MetalRootLayout at 69d9c55 I tried with UIManager.setLookAndFeel(new MetalLookAndFeel()); JFrame frame = new JFrame(); frame.setSize(new Dimension(500, 800)); frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); //frame.pack(); frame.setVisible(true); System.out.println("Layout: " + frame.getRootPane().getLayout()); System.out.println("PreferredSize " + frame.getRootPane().getPreferredSize()); but it seems tpWidth and tpHeight what is being changed is the width and height of MetalTitlePane which seems always comes as 23 for both no matter what frame size is set, so I guess using any variable will do but logically, it will be good to use "tpHeight" for height calculation. If it is believed to continue with same logical but not technical error, I will close this PR without integrating. ------------- PR: https://git.openjdk.java.net/jdk/pull/433 From serb at openjdk.java.net Thu Nov 5 04:09:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 5 Nov 2020 04:09:57 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: <_nj2FwAXWLqsE2I79uXTwcrlGQ58fiVDRoieoLUmwEo=.6f136cb8-3059-4186-9494-3c0f1c4e8c45@github.com> Message-ID: <73XquI71hVHCLLk5yrgOwbkxCv6N-CUqSyDptAS8WVA=.6042f3b5-0a5a-44b3-b58b-33e8383654f6@github.com> On Thu, 5 Nov 2020 03:55:33 GMT, Prasanta Sadhukhan wrote: >> You need to set decorations for the root pane: >> UIManager.setLookAndFeel(new MetalLookAndFeel()); >> JFrame frame = new JFrame(); >> frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); >> frame.pack(); >> System.out.println("Layout: " + frame.getRootPane().getLayout()); >> ======== >> Layout: javax.swing.plaf.metal.MetalRootPaneUI$MetalRootLayout at 69d9c55 > > I tried with > UIManager.setLookAndFeel(new MetalLookAndFeel()); > JFrame frame = new JFrame(); > frame.setSize(new Dimension(500, 800)); > frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); > //frame.pack(); > frame.setVisible(true); > System.out.println("Layout: " + frame.getRootPane().getLayout()); > System.out.println("PreferredSize " + frame.getRootPane().getPreferredSize()); > but it seems tpWidth and tpHeight what is being changed is the width and height of MetalTitlePane which seems always comes as 23 for both no matter what frame size is set, so I guess using any variable will do but logically, it will be good to use "tpHeight" for height calculation. > If it is believed to continue with same logical but not technical error, I will close this PR without integrating. The bug submitter said that it is somehow affected his application. So I assume there is a way to trigger this bug in the MetalRootLayout. ------------- PR: https://git.openjdk.java.net/jdk/pull/433 From psadhukhan at openjdk.java.net Thu Nov 5 04:09:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 5 Nov 2020 04:09:57 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: <73XquI71hVHCLLk5yrgOwbkxCv6N-CUqSyDptAS8WVA=.6042f3b5-0a5a-44b3-b58b-33e8383654f6@github.com> References: <_nj2FwAXWLqsE2I79uXTwcrlGQ58fiVDRoieoLUmwEo=.6f136cb8-3059-4186-9494-3c0f1c4e8c45@github.com> <73XquI71hVHCLLk5yrgOwbkxCv6N-CUqSyDptAS8WVA=.6042f3b5-0a5a-44b3-b58b-33e8383654f6@github.com> Message-ID: On Thu, 5 Nov 2020 04:04:10 GMT, Sergey Bylokhov wrote: >> I tried with >> UIManager.setLookAndFeel(new MetalLookAndFeel()); >> JFrame frame = new JFrame(); >> frame.setSize(new Dimension(500, 800)); >> frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); >> //frame.pack(); >> frame.setVisible(true); >> System.out.println("Layout: " + frame.getRootPane().getLayout()); >> System.out.println("PreferredSize " + frame.getRootPane().getPreferredSize()); >> but it seems tpWidth and tpHeight what is being changed is the width and height of MetalTitlePane which seems always comes as 23 for both no matter what frame size is set, so I guess using any variable will do but logically, it will be good to use "tpHeight" for height calculation. >> If it is believed to continue with same logical but not technical error, I will close this PR without integrating. > > The bug submitter said that it is somehow affected his application. So I assume there is a way to trigger this bug in the MetalRootLayout. >From MetalTitlePane.java, the same "height" is being used for width and height so the value is same for both. private class TitlePaneLayout implements LayoutManager { public void addLayoutComponent(String name, Component c) {} public void removeLayoutComponent(Component c) {} public Dimension preferredLayoutSize(Container c) { int height = computeHeight(); return new Dimension(height, height); } ------------- PR: https://git.openjdk.java.net/jdk/pull/433 From psadhukhan at openjdk.java.net Thu Nov 5 04:12:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 5 Nov 2020 04:12:55 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: <_nj2FwAXWLqsE2I79uXTwcrlGQ58fiVDRoieoLUmwEo=.6f136cb8-3059-4186-9494-3c0f1c4e8c45@github.com> <73XquI71hVHCLLk5yrgOwbkxCv6N-CUqSyDptAS8WVA=.6042f3b5-0a5a-44b3-b58b-33e8383654f6@github.com> Message-ID: On Thu, 5 Nov 2020 04:06:50 GMT, Prasanta Sadhukhan wrote: >> The bug submitter said that it is somehow affected his application. So I assume there is a way to trigger this bug in the MetalRootLayout. > > From MetalTitlePane.java, the same "height" is being used for width and height so the value is same for both. > private class TitlePaneLayout implements LayoutManager { > public void addLayoutComponent(String name, Component c) {} > public void removeLayoutComponent(Component c) {} > public Dimension preferredLayoutSize(Container c) { > int height = computeHeight(); > return new Dimension(height, height); > } There is no reproducible testcase and the submitter id is not active anymore so cannot ask him and I am not sure of any other way, so if this is not accepted without a reproducing testcase, I will close this PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/433 From serb at openjdk.java.net Thu Nov 5 11:32:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 5 Nov 2020 11:32:57 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: <6aMgUbkf3sKP69rM4mbfJBuMe845Et7jc_8pmRr-7gE=.88219b1a-ece0-4e04-886b-bacfdd4b119a@github.com> References: <6aMgUbkf3sKP69rM4mbfJBuMe845Et7jc_8pmRr-7gE=.88219b1a-ece0-4e04-886b-bacfdd4b119a@github.com> Message-ID: On Wed, 4 Nov 2020 14:35:35 GMT, Prasanta Sadhukhan wrote: >>> The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen >> >> You can use locx/loxy intentionally to move the window, but you can't use it in a robot because of: >>> you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS) > > Modified to use bounds. GC.getBounds() and Toolkit.getScreenSize() return the same bounds, but the bounds of the screen, not the window bounds. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Thu Nov 5 11:37:56 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 5 Nov 2020 11:37:56 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: <6aMgUbkf3sKP69rM4mbfJBuMe845Et7jc_8pmRr-7gE=.88219b1a-ece0-4e04-886b-bacfdd4b119a@github.com> Message-ID: On Thu, 5 Nov 2020 11:30:21 GMT, Sergey Bylokhov wrote: >> Modified to use bounds. > > GC.getBounds() and Toolkit.getScreenSize() return the same bounds, but the bounds of the screen, not the window bounds. I guess we need the screen bounds only, no? I guess by window bounds, u mean frame bounds which is anyway set to 300,300 which I did not change. If not, can you say which API to use? ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Fri Nov 6 03:43:11 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 6 Nov 2020 03:43:11 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v4] In-Reply-To: References: Message-ID: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Used window getbounds ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/955/files - new: https://git.openjdk.java.net/jdk/pull/955/files/cf936ae0..63209dd8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=02-03 Stats: 12 lines in 1 file changed: 5 ins; 6 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/955.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/955/head:pull/955 PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Fri Nov 6 09:02:09 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 6 Nov 2020 09:02:09 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 08:51:46 GMT, Sergey Bylokhov wrote: > Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. > > It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. > > mach5 is green src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java line 38: > 36: import java.util.concurrent.locks.ReentrantReadWriteLock; > 37: > 38: /* !!!! WARNING !!!! The comment is outdated we do not support win L&F on any Unix. src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java line 302: > 300: } > 301: > 302: public static native boolean isGetThemeTransitionDurationDefined(); This method was added in Vista so we guarded it by the runtime check. src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp line 177: > 175: && SetWindowThemeFunc > 176: && IsThemeBackgroundPartiallyTransparentFunc > 177: && GetThemeTransitionDurationFunc Now we check `GetThemeTransitionDurationFunc` as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From serb at openjdk.java.net Fri Nov 6 09:02:08 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 6 Nov 2020 09:02:08 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 Message-ID: Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. mach5 is green ------------- Commit messages: - 6422025: ThemeReader.cpp can be updated for VC7 Changes: https://git.openjdk.java.net/jdk/pull/1090/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1090&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6422025 Stats: 145 lines in 3 files changed: 2 ins; 63 del; 80 mod Patch: https://git.openjdk.java.net/jdk/pull/1090.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1090/head:pull/1090 PR: https://git.openjdk.java.net/jdk/pull/1090 From psadhukhan at openjdk.java.net Fri Nov 6 12:17:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 6 Nov 2020 12:17:57 GMT Subject: Withdrawn: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: Message-ID: On Wed, 30 Sep 2020 12:11:38 GMT, Prasanta Sadhukhan wrote: > Please review a fix for an issue where minimumLayoutSize and preferredlayoutSize of MetalRootLayout class wrongly uses the width of the title pane in the height calculation: > Proposed fix is to rectify the anomaly and use tpHeight for height calculation. > > All closed, open jtreg and JCK tests and SwingSet2 Metal L&F are unaffected by this change. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/433 From psadhukhan at openjdk.java.net Fri Nov 6 12:30:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 6 Nov 2020 12:30:55 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2] In-Reply-To: References: <6aMgUbkf3sKP69rM4mbfJBuMe845Et7jc_8pmRr-7gE=.88219b1a-ece0-4e04-886b-bacfdd4b119a@github.com> Message-ID: On Thu, 5 Nov 2020 11:35:20 GMT, Prasanta Sadhukhan wrote: >> GC.getBounds() and Toolkit.getScreenSize() return the same bounds, but the bounds of the screen, not the window bounds. > > I guess we need the screen bounds only, no? I guess by window bounds, u mean frame bounds which is anyway set to 300,300 which I did not change. > If not, can you say which API to use? Used window bounds...Please let me know if any other comments. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From aivanov at openjdk.java.net Fri Nov 6 18:21:00 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 6 Nov 2020 18:21:00 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 08:51:46 GMT, Sergey Bylokhov wrote: > Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. > > It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. > > mach5 is green Changes requested by aivanov (Reviewer). src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp line 126: > 124: DTRACE_PRINTLN("Loaded UxTheme.dll\n"); > 125: OpenThemeDataFunc = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes, > 126: "OpenThemeData"); Can't we use the functions directly? I mean we can link to `UxTheme.lib` and load the `UxTheme.dll` automatically. Dynamic loading was necessary for Windows versions before Windows XP where `UxTheme.dll` doesn't exist. ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From prappo at openjdk.java.net Fri Nov 6 20:17:04 2020 From: prappo at openjdk.java.net (Pavel Rappo) Date: Fri, 6 Nov 2020 20:17:04 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files Message-ID: This PR proposes to remove 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters ------------- Commit messages: - Initial commit Changes: https://git.openjdk.java.net/jdk/pull/1100/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1100&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255989 Stats: 140 lines in 77 files changed: 0 ins; 80 del; 60 mod Patch: https://git.openjdk.java.net/jdk/pull/1100.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1100/head:pull/1100 PR: https://git.openjdk.java.net/jdk/pull/1100 From redestad at openjdk.java.net Fri Nov 6 20:28:57 2020 From: redestad at openjdk.java.net (Claes Redestad) Date: Fri, 6 Nov 2020 20:28:57 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters A removed @author tag is a good @author tag ------------- Marked as reviewed by redestad (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1100 From mr at openjdk.java.net Fri Nov 6 21:17:59 2020 From: mr at openjdk.java.net (Mark Reinhold) Date: Fri, 6 Nov 2020 21:17:59 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters Marked as reviewed by mr (Lead). ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From mchung at openjdk.java.net Fri Nov 6 21:25:56 2020 From: mchung at openjdk.java.net (Mandy Chung) Date: Fri, 6 Nov 2020 21:25:56 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: <4lqSkD7QVCiQkecfe_9HY1XLD7-l0OqNLmjTfJ9AgQw=.f11bfd8f-ff3e-454c-a560-6f34637eeb2c@github.com> On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters Marked as reviewed by mchung (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From iris at openjdk.java.net Fri Nov 6 21:40:57 2020 From: iris at openjdk.java.net (Iris Clark) Date: Fri, 6 Nov 2020 21:40:57 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From serb at openjdk.java.net Fri Nov 6 22:13:00 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 6 Nov 2020 22:13:00 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 18:17:30 GMT, Alexey Ivanov wrote: >> Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. >> >> It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. >> >> mach5 is green > > src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp line 126: > >> 124: DTRACE_PRINTLN("Loaded UxTheme.dll\n"); >> 125: OpenThemeDataFunc = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes, >> 126: "OpenThemeData"); > > Can't we use the functions directly? I mean we can link to `UxTheme.lib` and load the `UxTheme.dll` automatically. > Dynamic loading was necessary for Windows versions before Windows XP where `UxTheme.dll` doesn't exist. That's was my comment in the description about: > It is time to use UxTheme.h directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly, also, the native win L&F is an optional thing. ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From aivanov at openjdk.java.net Fri Nov 6 22:45:58 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 6 Nov 2020 22:45:58 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 22:09:52 GMT, Sergey Bylokhov wrote: >> src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp line 126: >> >>> 124: DTRACE_PRINTLN("Loaded UxTheme.dll\n"); >>> 125: OpenThemeDataFunc = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes, >>> 126: "OpenThemeData"); >> >> Can't we use the functions directly? I mean we can link to `UxTheme.lib` and load the `UxTheme.dll` automatically. >> Dynamic loading was necessary for Windows versions before Windows XP where `UxTheme.dll` doesn't exist. > > That's was my comment in the description about: > >> It is time to use UxTheme.h directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly, > > also, the native win L&F is an optional thing. Thank you for the clarification. I must have missed this note. Yes, I later realised that it could be the reason why you didn't update how the DLL is loaded. Delay-load is another option, on the other hand there's already the code to load the library and get the function pointers. ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From aivanov at openjdk.java.net Fri Nov 6 22:45:57 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 6 Nov 2020 22:45:57 GMT Subject: RFR: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 08:51:46 GMT, Sergey Bylokhov wrote: > Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. > > It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. > > mach5 is green Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From serb at openjdk.java.net Sat Nov 7 06:13:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 7 Nov 2020 06:13:57 GMT Subject: Integrated: 6422025: ThemeReader.cpp can be updated for VC7 In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 08:51:46 GMT, Sergey Bylokhov wrote: > Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6. > > It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly. > > mach5 is green This pull request has now been integrated. Changeset: 358f5d2b Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/358f5d2b Stats: 145 lines in 3 files changed: 2 ins; 63 del; 80 mod 6422025: ThemeReader.cpp can be updated for VC7 Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/1090 From serb at openjdk.java.net Sat Nov 7 09:04:58 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 7 Nov 2020 09:04:58 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v3] In-Reply-To: References: Message-ID: On Wed, 4 Nov 2020 14:38:06 GMT, Prasanta Sadhukhan wrote: >> Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. >> Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > use getBounds() test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 96: > 94: getDefaultScreenDevice().getDefaultConfiguration(). > 95: getBounds(); > 96: locx = rect.width/2; The usage of size 300x300 has the same issues as locx/locy before. It is part of the window bounds. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Sat Nov 7 09:07:54 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 7 Nov 2020 09:07:54 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From prappo at openjdk.java.net Sat Nov 7 11:52:08 2020 From: prappo at openjdk.java.net (Pavel Rappo) Date: Sat, 7 Nov 2020 11:52:08 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files [v2] In-Reply-To: References: Message-ID: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters Pavel Rappo 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 two additional commits since the last revision: - Merge branch 'master' into 8255989 - Initial commit ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1100/files - new: https://git.openjdk.java.net/jdk/pull/1100/files/9f9b0a85..830ffafb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1100&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1100&range=00-01 Stats: 192 lines in 9 files changed: 28 ins; 64 del; 100 mod Patch: https://git.openjdk.java.net/jdk/pull/1100.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1100/head:pull/1100 PR: https://git.openjdk.java.net/jdk/pull/1100 From prappo at openjdk.java.net Sat Nov 7 12:09:55 2020 From: prappo at openjdk.java.net (Pavel Rappo) Date: Sat, 7 Nov 2020 12:09:55 GMT Subject: RFR: 8255989: Remove explicitly unascribed authorship from Java source files [v2] In-Reply-To: References: Message-ID: On Sat, 7 Nov 2020 09:05:29 GMT, Sergey Bylokhov wrote: >> Pavel Rappo 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 two additional commits since the last revision: >> >> - Merge branch 'master' into 8255989 >> - Initial commit > > Marked as reviewed by serb (Reviewer). Thanks to all the reviewers, this may be now integrated. For extra confidence, I went to https://openjdk.java.net/census and checked that there are no authors whose name is one of "unascribed", "unattributed", or "unknown". I did this because some words might not be what they seem: for example, see https://stackoverflow.com/questions/4456438/how-to-pass-null-a-real-surname-to-a-soap-web-service-in-actionscript-3 ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From prappo at openjdk.java.net Sat Nov 7 12:14:56 2020 From: prappo at openjdk.java.net (Pavel Rappo) Date: Sat, 7 Nov 2020 12:14:56 GMT Subject: Integrated: 8255989: Remove explicitly unascribed authorship from Java source files In-Reply-To: References: Message-ID: On Fri, 6 Nov 2020 20:11:24 GMT, Pavel Rappo wrote: > This PR proposes to remove > 1. JavaDoc `@author` tags with unclear semantics: `@author unascribed|unattributed|unknown` > 2. A couple of astray Form Feed (a.k.a. FF, `\f`, `0xC`, or `^L`) characters This pull request has now been integrated. Changeset: c5462bb9 Author: Pavel Rappo URL: https://git.openjdk.java.net/jdk/commit/c5462bb9 Stats: 140 lines in 77 files changed: 0 ins; 80 del; 60 mod 8255989: Remove explicitly unascribed authorship from Java source files Reviewed-by: redestad, mr, mchung, iris, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/1100 From psadhukhan at openjdk.java.net Sat Nov 7 14:36:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sat, 7 Nov 2020 14:36:57 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v3] In-Reply-To: References: Message-ID: On Sat, 7 Nov 2020 09:02:02 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> use getBounds() > > test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 96: > >> 94: getDefaultScreenDevice().getDefaultConfiguration(). >> 95: getBounds(); >> 96: locx = rect.width/2; > > The usage of size 300x300 has the same issues as locx/locy before. It is part of the window bounds. but 300x300 is set in frame setSize..if I use frame getBounds instead of already set 300x300, that will not be right, according to me...What if getBounds() has some bug (in some platform) and return some other width/height (say 1 pixel less, we might have similar bug in 8196465) that what is set in setSize, then the test might pass even though robot is capturing wrong bounds. ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Sat Nov 7 23:10:56 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 7 Nov 2020 23:10:56 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v3] In-Reply-To: References: Message-ID: On Sat, 7 Nov 2020 14:33:42 GMT, Prasanta Sadhukhan wrote: > but 300x300 is set in frame setSize..if I use frame getBounds instead of already set 300x300, that will not be right, according to me... The test should set the size 300,300 to the frame and then request and use the real bounds of the frame. > What if getBounds() has some bug (in some platform) and return some other width/height (say 1 pixel less, we might have similar bug in 8196465) that what is set in setSize, then the test might pass even though robot is capturing wrong bounds. The getBounds() simply returns the size which was set by the native system, so is it a bug in getBounds() or the real bounds of the frame "say 1 pixel less"? ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Mon Nov 9 00:42:00 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 9 Nov 2020 00:42:00 GMT Subject: RFR: 8256014: Eliminate the warning about serialization in non-public API of Swing Message-ID: As part of the serialization cleanup, I would like to remove the serialization warning below from the non-public API(mostly motif and windows L&Fs). Later I will remove it from the public API and move this warning to the "javax.swing" package spec. * Warning: * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is appropriate * for short term storage or RMI between applications running the same * version of Swing. A future release of Swing will provide support for * long term persistence. Note that this warning is useless because the UI delegates(parts of L&F) should never be serialized. Such classes were marked as "Serializable" by accident. If the component like JButton is serialized then parts related to the L&F are removed from the stream. This is because default L&F could be different before/after serialization. ------------- Commit messages: - 8256014: Eliminate the warning about serialization in non-public API of Swing Changes: https://git.openjdk.java.net/jdk/pull/1110/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1110&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256014 Stats: 1405 lines in 67 files changed: 404 ins; 700 del; 301 mod Patch: https://git.openjdk.java.net/jdk/pull/1110.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1110/head:pull/1110 PR: https://git.openjdk.java.net/jdk/pull/1110 From prr at openjdk.java.net Mon Nov 9 01:23:58 2020 From: prr at openjdk.java.net (Phil Race) Date: Mon, 9 Nov 2020 01:23:58 GMT Subject: RFR: 8256014: Eliminate the warning about serialization in non-public API of Swing In-Reply-To: References: Message-ID: On Sun, 8 Nov 2020 09:14:41 GMT, Sergey Bylokhov wrote: > As part of the serialization cleanup, I would like to remove the serialization warning below from the non-public API(mostly motif and windows L&Fs). Later I will remove it from the public API and move this warning to the "javax.swing" package spec. > > * Warning: > * Serialized objects of this class will not be compatible with > * future Swing releases. The current serialization support is appropriate > * for short term storage or RMI between applications running the same > * version of Swing. A future release of Swing will provide support for > * long term persistence. > > Note that this warning is useless because the UI delegates(parts of L&F) should never be serialized. Such classes were marked as "Serializable" by accident. If the component like JButton is serialized then parts related to the L&F are removed from the stream. This is because default L&F could be different before/after serialization. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1110 From psadhukhan at openjdk.java.net Mon Nov 9 04:04:09 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 9 Nov 2020 04:04:09 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v5] In-Reply-To: References: Message-ID: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Address review comment ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/955/files - new: https://git.openjdk.java.net/jdk/pull/955/files/63209dd8..f5fd7169 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=955&range=03-04 Stats: 9 lines in 1 file changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/955.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/955/head:pull/955 PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Mon Nov 9 04:18:54 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 9 Nov 2020 04:18:54 GMT Subject: RFR: 8256014: Eliminate the warning about serialization in non-public API of Swing In-Reply-To: References: Message-ID: On Sun, 8 Nov 2020 09:14:41 GMT, Sergey Bylokhov wrote: > As part of the serialization cleanup, I would like to remove the serialization warning below from the non-public API(mostly motif and windows L&Fs). Later I will remove it from the public API and move this warning to the "javax.swing" package spec. > > * Warning: > * Serialized objects of this class will not be compatible with > * future Swing releases. The current serialization support is appropriate > * for short term storage or RMI between applications running the same > * version of Swing. A future release of Swing will provide support for > * long term persistence. > > Note that this warning is useless because the UI delegates(parts of L&F) should never be serialized. Such classes were marked as "Serializable" by accident. If the component like JButton is serialized then parts related to the L&F are removed from the stream. This is because default L&F could be different before/after serialization. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1110 From serb at openjdk.java.net Mon Nov 9 06:43:56 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 9 Nov 2020 06:43:56 GMT Subject: Integrated: 8256014: Eliminate the warning about serialization in non-public API of Swing In-Reply-To: References: Message-ID: On Sun, 8 Nov 2020 09:14:41 GMT, Sergey Bylokhov wrote: > As part of the serialization cleanup, I would like to remove the serialization warning below from the non-public API(mostly motif and windows L&Fs). Later I will remove it from the public API and move this warning to the "javax.swing" package spec. > > * Warning: > * Serialized objects of this class will not be compatible with > * future Swing releases. The current serialization support is appropriate > * for short term storage or RMI between applications running the same > * version of Swing. A future release of Swing will provide support for > * long term persistence. > > Note that this warning is useless because the UI delegates(parts of L&F) should never be serialized. Such classes were marked as "Serializable" by accident. If the component like JButton is serialized then parts related to the L&F are removed from the stream. This is because default L&F could be different before/after serialization. This pull request has now been integrated. Changeset: c7551c37 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/c7551c37 Stats: 1405 lines in 67 files changed: 404 ins; 700 del; 301 mod 8256014: Eliminate the warning about serialization in non-public API of Swing Reviewed-by: prr, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/1110 From psadhukhan at openjdk.java.net Mon Nov 9 08:39:01 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 9 Nov 2020 08:39:01 GMT Subject: RFR: 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out Message-ID: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> This test has failed in one of jdk nightly testing although it always passed locally. Made the test use robot delays, waitForIdle() to make it more stable and appropriate to run in slower mach5 systems and also remove the dependancy on ExtendedRobot. Mach5 job has been run for several iterations in all platforms. Link in JBS. ------------- Commit messages: - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1115/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1115&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255916 Stats: 65 lines in 1 file changed: 12 ins; 23 del; 30 mod Patch: https://git.openjdk.java.net/jdk/pull/1115.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1115/head:pull/1115 PR: https://git.openjdk.java.net/jdk/pull/1115 From kizune at openjdk.java.net Mon Nov 9 12:03:11 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 9 Nov 2020 12:03:11 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: > 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Test case made multiplatform and testing all the LaF's ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1035/files - new: https://git.openjdk.java.net/jdk/pull/1035/files/ff35c56a..31cfa27c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1035&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1035&range=00-01 Stats: 151 lines in 1 file changed: 79 ins; 45 del; 27 mod Patch: https://git.openjdk.java.net/jdk/pull/1035.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1035/head:pull/1035 PR: https://git.openjdk.java.net/jdk/pull/1035 From kizune at openjdk.java.net Mon Nov 9 12:03:12 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 9 Nov 2020 12:03:12 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 16:44:36 GMT, Prasanta Sadhukhan wrote: > I think even if the fix is in windows, there's no harm in making the test platform agnostic and let it run for all platforms. Done. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From kizune at openjdk.java.net Mon Nov 9 12:03:14 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 9 Nov 2020 12:03:14 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 18:41:20 GMT, Sergey Bylokhov wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Test case made multiplatform and testing all the LaF's > > test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 57: > >> 55: try { >> 56: // Set system look and feel >> 57: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); > > I suggest checking all installed L&Fs for example https://github.com/openjdk/jdk/pull/989/files Fixed > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java line 1229: > >> 1227: // and uninstall menu keybindings >> 1228: removeItems(); >> 1229: menuInputMap = null; > > Just curious, will the uninstall(); at the start of the method will clear this flag as well? We do call ninstall() at the beginning of the method but it does not resolve the issue. > test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 89: > >> 87: for(int i=0; i<3; i++) { >> 88: try { >> 89: ArrayList gc = new ArrayList(); > > It will be useful to call System.gc() and limit the size of the heap via -mx System.gc() does not affect test in any way so i just left it out. > test/jdk/javax/swing/JMenu/PopupReferenceMemoryLeak.java line 100: > >> 98: } >> 99: robot.waitForIdle(); >> 100: robot.keyPress(KeyEvent.VK_ALT); > > Can we skip the robot interaction and instead show the popup menu ourselves? (not via menu items) No, unfortunately one of the mechanics i'm testing only reproducible when popup is being opened from JMenuBar. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From kizune at openjdk.java.net Mon Nov 9 12:03:14 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 9 Nov 2020 12:03:14 GMT Subject: Withdrawn: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper In-Reply-To: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 10:32:01 GMT, Alexander Zuev wrote: > 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From serb at openjdk.java.net Mon Nov 9 18:04:56 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 9 Nov 2020 18:04:56 GMT Subject: RFR: 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out In-Reply-To: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> References: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> Message-ID: On Mon, 9 Nov 2020 08:34:24 GMT, Prasanta Sadhukhan wrote: > This test has failed in one of jdk nightly testing although it always passed locally. Made the test use robot delays, waitForIdle() to make it more stable and appropriate to run in slower mach5 systems and also remove the dependancy on ExtendedRobot. > Mach5 job has been run for several iterations in all platforms. Link in JBS. test/jdk/javax/swing/JInternalFrame/6647340/bug6647340.java line 133: > 131: iconloc = jif.getDesktopIcon().getLocation(); > 132: }); > 133: if (iconloc.equals(location)) { iconloc and iconloc are set on EDT and used on the main thread, it would be good to mark them volatile. ------------- PR: https://git.openjdk.java.net/jdk/pull/1115 From serb at openjdk.java.net Mon Nov 9 18:11:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 9 Nov 2020 18:11:57 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: <2kVgnn_UFxXNRs_LF49yBjzIC-XSdscyPd4cgwhHX6A=.66ef68f4-ec8c-4446-a578-d1b420522eda@github.com> On Mon, 9 Nov 2020 11:57:40 GMT, Alexander Zuev wrote: >> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java line 1229: >> >>> 1227: // and uninstall menu keybindings >>> 1228: removeItems(); >>> 1229: menuInputMap = null; >> >> Just curious, will the uninstall(); at the start of the method will clear this flag as well? > > We do call ninstall() at the beginning of the method but it does not resolve the issue. I meant this code at the start of the method: ` if (!(UIManager.getLookAndFeel() instanceof BasicLookAndFeel)) { uninstall(); return; }` If "uninstall" will not solve the problem and the code added in this fix will not be executed, then we will get the same leak? ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From github.com+72060147+amresh-sahu at openjdk.java.net Mon Nov 9 18:36:04 2020 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Mon, 9 Nov 2020 18:36:04 GMT Subject: RFR: 8253905: Update sanity test suite to not place windows at (0, 0) Message-ID: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> Four files has been modified: modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/frame/FrameDemo.java modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/table/TableDemo.java modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java Tested on Mach5 and all tests passes. ------------- Commit messages: - Update TableDemo.java - Update DialogDemo.java - Update WindowDemo.java - Update DialogDemo.java - Update TableDemo.java - Update WindowDemo.java - Update WindowDemo.java - Checked-in changes for JDK-8253905 Changes: https://git.openjdk.java.net/jdk/pull/625/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=625&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8253905 Stats: 4 lines in 4 files changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/625.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/625/head:pull/625 PR: https://git.openjdk.java.net/jdk/pull/625 From shurailine at openjdk.java.net Mon Nov 9 18:36:04 2020 From: shurailine at openjdk.java.net (Alexandre Iline) Date: Mon, 9 Nov 2020 18:36:04 GMT Subject: RFR: 8253905: Update sanity test suite to not place windows at (0, 0) In-Reply-To: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> References: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> Message-ID: <-lExk1C25UNtvSajcVa2JmV7puA5SQlfuMC2a9FpUiI=.34fe8c36-a87d-4f36-b884-7744357b3095@github.com> On Tue, 13 Oct 2020 08:05:34 GMT, Amresh Sahu wrote: > Four files has been modified: > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/frame/FrameDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/table/TableDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java > > Tested on Mach5 and all tests passes. Marked as reviewed by shurailine (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/625 From github.com+72060147+amresh-sahu at openjdk.java.net Mon Nov 9 18:36:04 2020 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Mon, 9 Nov 2020 18:36:04 GMT Subject: RFR: 8253905: Update sanity test suite to not place windows at (0, 0) In-Reply-To: <-lExk1C25UNtvSajcVa2JmV7puA5SQlfuMC2a9FpUiI=.34fe8c36-a87d-4f36-b884-7744357b3095@github.com> References: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> <-lExk1C25UNtvSajcVa2JmV7puA5SQlfuMC2a9FpUiI=.34fe8c36-a87d-4f36-b884-7744357b3095@github.com> Message-ID: On Tue, 13 Oct 2020 17:03:16 GMT, Alexandre Iline wrote: >> Four files has been modified: >> modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java >> modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/frame/FrameDemo.java >> modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/table/TableDemo.java >> modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java >> >> Tested on Mach5 and all tests passes. > > Marked as reviewed by shurailine (Committer). @mrserb @akolarkunnu Please review my code changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/625 From robilad at openjdk.java.net Mon Nov 9 18:36:04 2020 From: robilad at openjdk.java.net (Dalibor Topic) Date: Mon, 9 Nov 2020 18:36:04 GMT Subject: RFR: 8253905: Update sanity test suite to not place windows at (0, 0) In-Reply-To: References: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> <-lExk1C25UNtvSajcVa2JmV7puA5SQlfuMC2a9FpUiI=.34fe8c36-a87d-4f36-b884-7744357b3095@github.com> Message-ID: On Tue, 20 Oct 2020 03:43:49 GMT, Amresh Sahu wrote: >> Marked as reviewed by shurailine (Committer). > > @mrserb @akolarkunnu > > Please review my code changes. Hi, can you let me know under whose OCA your contributions would be covered via e-mail to dalibor.topic at oracle.com, please? Then I can verify your account. Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/625 From serb at openjdk.java.net Mon Nov 9 19:37:58 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 9 Nov 2020 19:37:58 GMT Subject: RFR: 8253905: Update sanity test suite to not place windows at (0, 0) In-Reply-To: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> References: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> Message-ID: <1aUqcTAFqztmuYKEpPdBJ66abbT3aVs-CXMZmXnmebc=.949587e7-59e8-45b6-a293-84bdb4c5f964@github.com> On Tue, 13 Oct 2020 08:05:34 GMT, Amresh Sahu wrote: > Four files has been modified: > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/frame/FrameDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/table/TableDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java > > Tested on Mach5 and all tests passes. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/625 From kizune at openjdk.java.net Mon Nov 9 23:27:55 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 9 Nov 2020 23:27:55 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: <2kVgnn_UFxXNRs_LF49yBjzIC-XSdscyPd4cgwhHX6A=.66ef68f4-ec8c-4446-a578-d1b420522eda@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> <2kVgnn_UFxXNRs_LF49yBjzIC-XSdscyPd4cgwhHX6A=.66ef68f4-ec8c-4446-a578-d1b420522eda@github.com> Message-ID: <6Yshz_j4vL9vPCT_fbWebxmv6IGKKug7ZolO2GDVw0Q=.2d582579-25e9-4008-b073-1d608378d42c@github.com> On Mon, 9 Nov 2020 18:08:57 GMT, Sergey Bylokhov wrote: >> We do call ninstall() at the beginning of the method but it does not resolve the issue. > > I meant this code at the start of the method: > ` if (!(UIManager.getLookAndFeel() instanceof BasicLookAndFeel)) { > uninstall(); > return; > }` > If "uninstall" will not solve the problem and the code added in this fix will not be executed, then we will get the same leak? The code block here with uninstall is called if currently installed LAF is not derived from BasicLAF in which case we will not have this problem in the first place - the only place where we are setting menuInputMap variable is in this method down the line so it never gets initialized. And no, calling uninstall() unconditionally will not solve the problem because uninstall() does not change this value either. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From serb at openjdk.java.net Tue Nov 10 02:50:54 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 10 Nov 2020 02:50:54 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: <6Yshz_j4vL9vPCT_fbWebxmv6IGKKug7ZolO2GDVw0Q=.2d582579-25e9-4008-b073-1d608378d42c@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> <2kVgnn_UFxXNRs_LF49yBjzIC-XSdscyPd4cgwhHX6A=.66ef68f4-ec8c-4446-a578-d1b420522eda@github.com> <6Yshz_j4vL9vPCT_fbWebxmv6IGKKug7ZolO2GDVw0Q=.2d582579-25e9-4008-b073-1d608378d42c@github.com> Message-ID: On Mon, 9 Nov 2020 23:25:13 GMT, Alexander Zuev wrote: >> I meant this code at the start of the method: >> ` if (!(UIManager.getLookAndFeel() instanceof BasicLookAndFeel)) { >> uninstall(); >> return; >> }` >> If "uninstall" will not solve the problem and the code added in this fix will not be executed, then we will get the same leak? > > The code block here with uninstall is called if currently installed LAF is not derived from BasicLAF in which case we will not have this problem in the first place - the only place where we are setting menuInputMap variable is in this method down the line so it never gets initialized. And no, calling uninstall() unconditionally will not solve the problem because uninstall() does not change this value either. I guess that the uninstall() above is called when the L&F was basic(since BasicPopupMenuUI is used) and then changed for some reason, so when the method in the BasicPopupMenuUI.java will be called we will find that the current L&F is different and call "uninstall()", so this is my question: will the leak will exist in that case? I mean the code changed by the current fix will not be executed since we will exit after "uninstall()". ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From psadhukhan at openjdk.java.net Tue Nov 10 03:41:02 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 10 Nov 2020 03:41:02 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v3] In-Reply-To: References: Message-ID: On Sat, 7 Nov 2020 23:08:18 GMT, Sergey Bylokhov wrote: >> but 300x300 is set in frame setSize..if I use frame getBounds instead of already set 300x300, that will not be right, according to me...What if getBounds() has some bug (in some platform) and return some other width/height (say 1 pixel less, we might have similar bug in 8196465) that what is set in setSize, then the test might pass even though robot is capturing wrong bounds. > >> but 300x300 is set in frame setSize..if I use frame getBounds instead of already set 300x300, that will not be right, according to me... > > The test should set the size 300,300 to the frame and then request and use the real bounds of the frame. > >> What if getBounds() has some bug (in some platform) and return some other width/height (say 1 pixel less, we might have similar bug in 8196465) that what is set in setSize, then the test might pass even though robot is capturing wrong bounds. > > The getBounds() simply returns the size which was set by the native system, so is it a bug in getBounds() or the real bounds of the frame "say 1 pixel less"? Any further feedback? ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From psadhukhan at openjdk.java.net Tue Nov 10 04:14:15 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 10 Nov 2020 04:14:15 GMT Subject: RFR: 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out [v2] In-Reply-To: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> References: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> Message-ID: > This test has failed in one of jdk nightly testing although it always passed locally. Made the test use robot delays, waitForIdle() to make it more stable and appropriate to run in slower mach5 systems and also remove the dependancy on ExtendedRobot. > Mach5 job has been run for several iterations in all platforms. Link in JBS. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Marked volatile ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1115/files - new: https://git.openjdk.java.net/jdk/pull/1115/files/9f53b404..a875bff4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1115&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1115&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1115.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1115/head:pull/1115 PR: https://git.openjdk.java.net/jdk/pull/1115 From github.com+72060147+amresh-sahu at openjdk.java.net Tue Nov 10 05:29:59 2020 From: github.com+72060147+amresh-sahu at openjdk.java.net (Amresh Sahu) Date: Tue, 10 Nov 2020 05:29:59 GMT Subject: Integrated: 8253905: Update sanity test suite to not place windows at (0, 0) In-Reply-To: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> References: <3N-nPvDM_3O1fd0gLG3J5dNA_5oVCzTGY6nNiWG0HwI=.44b59b3e-6b0e-4b53-82d1-309180edd8ed@github.com> Message-ID: On Tue, 13 Oct 2020 08:05:34 GMT, Amresh Sahu wrote: > Four files has been modified: > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/frame/FrameDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/table/TableDemo.java > modified: test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java > > Tested on Mach5 and all tests passes. This pull request has now been integrated. Changeset: 8066b33c Author: amresh-sahu <72060147+amresh-sahu at users.noreply.github.com> Committer: Alexandre Iline URL: https://git.openjdk.java.net/jdk/commit/8066b33c Stats: 4 lines in 4 files changed: 4 ins; 0 del; 0 mod 8253905: Update sanity test suite to not place windows at (0,0) Reviewed-by: shurailine, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/625 From kizune at openjdk.java.net Tue Nov 10 09:19:59 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 10 Nov 2020 09:19:59 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v4] In-Reply-To: References: Message-ID: On Wed, 28 Oct 2020 23:46:55 GMT, Sergey Bylokhov wrote: >> Hello. >> Please review the fix for jdk. >> >> Old review request: >> https://mail.openjdk.java.net/pipermail/awt-dev/2020-July/015991.html >> >> >> (Note: the fix use API available since Windows 8.1: WM_DPICHANGED, but it should be fine for >> Windows 7, because it does not support different DPI for different monitors) >> >> ======================================================== >> Short description: >> In the multi-screen configurations when each screen have different DPI >> we calculate the bounds of each monitor by these formulas: >> >> userSpaceBounds = deviceX / scaleX, deviceY / scaleY, deviceW / scaleX, deviceH / scaleY >> devSpaceBounds = userX * scaleX, userY * scaleY, userW * scaleX, userH * scaleY >> >> This formula makes the next configuration completely broken: >> - The main screen on the left and 100% DPI >> - The second screen on the right and 200% DPI >> When we translate the bounds of the config from the device space to the user's space, >> the bounds of both screen overlap in the user's space, because we use bounds of >> the main screen as-is, and the X/Y of the second screen are divided by the scaleX/Y. >> >> Since the screens are overlapped we cannot be sure how to translate the user's space >> coordinates to device space in the overlapped zone. >> As a result => we use the wrong screen >> => got wrong coordinates in the device space >> => show top-level windows/popups/tooltips/menus/etc on the wrong screen >> >> The proposed solution for this bug is to change the formulas to these: >> >> userSpaceBounds = deviceX, deviceY, deviceW / scaleX, deviceH / scaleY >> devSpaceBounds = userX, userY, userW * scaleX, userH * scaleY >> >> In other words, we should not transform the X and Y coordinates of the screen(the top/left corner). This will >> complicate the way of how we transform coordinates on the screen: user's <--> device spaces: >> >> Before the fix: >> >> userX = deviceX * scaleX; >> deviceX = userX / scaleX; >> >> After the fix(only the part appeared on this screen should be scaled) >> >> userX = screenX + (deviceX - screenX) * scaleX >> deviceX = screenX + (userX - screenX) / scaleX >> >> Note that these new formulas are applicable only for the coordinates on the screen such as X and Y. >> If we will need to calculate the "size" such as W and H then the old formula should be used. >> >> The main changes for the problem above are: >> - Skip transformation of X and Y of the screen bounds: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsConfig.cpp.sdiff.html >> - A number of utility methods in java and native: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp.sdiff.html >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java.sdiff.html >> >> >> ======================================================== >> Long description: >> Unfortunately, the changes above are not enough to fix the problem when different monitors >> have different DPI, even if the bounds are *NOT* overlapped. >> >> - Currently, when we try to set the bounds of the window, we manually convert it in "java" to the >> expected device position based on the current GraphicsConfiguration of the peer, and then >> additionally, tweak it in native using the device scale stored in native code. Unfortunately >> this two scale might not be in sync:(after we use the GraphicsConfiguration scale in peer, >> the config might be changed and the tweak in native will use a different screen). >> >> As a fix I have moved all transformation from the peer to the native code, it will be executed >> on the toolkit thread: >> See the change in WWindowPeer.setBounds() and awt_Window.cpp AwtWindow::Reshape >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java.sdiff.html >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html >> I think at some point we should delete all transformation in java, and apply it in the native code only. >> >> >> - We had a special code that tracked the dragging of the window by the user from one screen to another, >> and change the size of the window only when the user stops the drag operation. I've proposed to use standard Windows >> machinery for that via WM_DPICHANGED: https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged >> As a result, Windows will provide the "best" windows bounds on the new screen. Note that the code has a >> workaround for https://bugs.openjdk.java.net/browse/JDK-8249164 >> >> - I've also fix a variation of the bug previously fixed on macOS https://hg.openjdk.java.net/jdk/jdk/rev/b5cdba232fca >> If we try to change the position of the window, and Windows ignores this request then we need to call all "callbacks" manually, otherwise, the shared code will use the bounds ignored by the Windows. >> See the end of void AwtWindow::Reshape(): >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html >> >> - Currently the HW componets such as Canvas scales everything based on such code: >> >> 770 int AwtComponent::ScaleUpX(int x) { >> 4771 int screen = AwtWin32GraphicsDevice::DeviceIndexForWindow(GetHWnd()); >> 4772 Devices::InstanceAccess devices; >> 4773 AwtWin32GraphicsDevice* device = devices->GetDevice(screen); >> 4774 return device == NULL ? x : device->ScaleUpX(x); >> 4775 } >> >> But it does not work well if the smaller part of the top-level window is located on one screen1(DPI=100) but >> the biggest part is located on the screen2(DPI=200). If the Canvas is located on the "smaller" part of the >> window, then the canvas will use DPI=100 for scale, but the whole window will use DPI=200 >> >> As a fix, all HW components will try to use the scale factor of the top-level window, see AwtComponent::GetScreenImOn: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp.sdiff.html >> >> - Our current implementation does not take care of the case when the HW component bounds are updated when the top-level >> the window is moved to another screen. For example, if the window does not use LayoutManager and the user sets some specific bounds for the Canvas. It is expected that the size of the Canvas will be updated when the window will be moved to another screen, but only HW top-level window and Swing components will update its size. >> >> As a fix I suggest to resync the bounds of the HW components if the GraphicsCOnfiguration is changed, see WComponentPeer.syncBounds(): >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java.sdiff.html >> >> - Note that the current fix is for Windows only, but the bug exists on Linux as well, so I have to create a kind of "ifdef" in the >> Robot class, on windows we will use the new logic, on other platforms the old logic will be used. >> >> - The win32GraphicsDevice incorrectly sets the size of the full-screen window. It uses the display mode width/height(which are stored in pixels), but the bounds of the graphics config(which are stored in user's space) should be used. >> >> ======================================================== >> Some other bugs which are not fixed. >> >> - We have a lot of places where we mix(unintentionally) the coordinate in user's space and device space. >> For example when we create the component we read x/y/width/height by the JNI(of course in a user's space) >> but pass this coordinates as-is to the ::CreateWindowEx() which is incorrect. It works currently >> because later we reshape the component to the correct bounds. Will fix it later. >> >> - When the frame is iconized and we try to save a new bounds for the future use, we store the >> coordinates in the user's space to the field which use device space: >> https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp#L664 >> >> Probably there are some other bugs and possibility to cleanups, but I would like to do that in separate issues. >> >> >> ======================================================== >> The tests >> - I have updated a couple of the tests to check multiple screens if possible, it helps to found some bugs >> in my initial implementation >> - Four new tests were added: SetComponentsBounds, SlowMotion, WindowSizeDifferentScreens, FullscreenWindowProps >> - One test is moved from the closed repo(I made a small cleanup of it): ListMultipleSelectTest >> >> ======================================================== >> I have run jck, regression tests in different configurations, when the main screen is on the left, up, down, >> right, and have different DPI such as 100, 125, 150, and 200. No new issues were found so far. >> >> The mach5 is also green. >> >> PS: hope I did not forget some important information, will send it later if any. > > Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: > > - Update WindowSizeDifferentScreens.java > - Update ListMultipleSelectTest.java > - syncBounds code reformat > - javadoc fix for SunGraphicsEnvironment#toDeviceSpace > - Merge branch 'master' into JDK-8211999 > - Apply suggestions from code review > > Co-authored-by: Aleksei Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Merge branch 'master' into JDK-8211999 > - Update FullscreenWindowProps.java > - Merge branch 'master' into JDK-8211999 > - Fix fullscreen in HiDPI mode > - ... and 2 more: https://git.openjdk.java.net/jdk/compare/1a5e6c98...636b7cc4 Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From aivanov at openjdk.java.net Tue Nov 10 09:54:59 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 10 Nov 2020 09:54:59 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v4] In-Reply-To: References: Message-ID: <5LNG6nKhwE5XoKjIS9E8Sr5x0IxcFYUcszeGcEck87s=.5d5bb638-c044-4b75-899d-758ed21b872e@github.com> On Wed, 28 Oct 2020 23:46:55 GMT, Sergey Bylokhov wrote: >> Hello. >> Please review the fix for jdk. >> >> Old review request: >> https://mail.openjdk.java.net/pipermail/awt-dev/2020-July/015991.html >> >> >> (Note: the fix use API available since Windows 8.1: WM_DPICHANGED, but it should be fine for >> Windows 7, because it does not support different DPI for different monitors) >> >> ======================================================== >> Short description: >> In the multi-screen configurations when each screen have different DPI >> we calculate the bounds of each monitor by these formulas: >> >> userSpaceBounds = deviceX / scaleX, deviceY / scaleY, deviceW / scaleX, deviceH / scaleY >> devSpaceBounds = userX * scaleX, userY * scaleY, userW * scaleX, userH * scaleY >> >> This formula makes the next configuration completely broken: >> - The main screen on the left and 100% DPI >> - The second screen on the right and 200% DPI >> When we translate the bounds of the config from the device space to the user's space, >> the bounds of both screen overlap in the user's space, because we use bounds of >> the main screen as-is, and the X/Y of the second screen are divided by the scaleX/Y. >> >> Since the screens are overlapped we cannot be sure how to translate the user's space >> coordinates to device space in the overlapped zone. >> As a result => we use the wrong screen >> => got wrong coordinates in the device space >> => show top-level windows/popups/tooltips/menus/etc on the wrong screen >> >> The proposed solution for this bug is to change the formulas to these: >> >> userSpaceBounds = deviceX, deviceY, deviceW / scaleX, deviceH / scaleY >> devSpaceBounds = userX, userY, userW * scaleX, userH * scaleY >> >> In other words, we should not transform the X and Y coordinates of the screen(the top/left corner). This will >> complicate the way of how we transform coordinates on the screen: user's <--> device spaces: >> >> Before the fix: >> >> userX = deviceX * scaleX; >> deviceX = userX / scaleX; >> >> After the fix(only the part appeared on this screen should be scaled) >> >> userX = screenX + (deviceX - screenX) * scaleX >> deviceX = screenX + (userX - screenX) / scaleX >> >> Note that these new formulas are applicable only for the coordinates on the screen such as X and Y. >> If we will need to calculate the "size" such as W and H then the old formula should be used. >> >> The main changes for the problem above are: >> - Skip transformation of X and Y of the screen bounds: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsConfig.cpp.sdiff.html >> - A number of utility methods in java and native: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp.sdiff.html >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java.sdiff.html >> >> >> ======================================================== >> Long description: >> Unfortunately, the changes above are not enough to fix the problem when different monitors >> have different DPI, even if the bounds are *NOT* overlapped. >> >> - Currently, when we try to set the bounds of the window, we manually convert it in "java" to the >> expected device position based on the current GraphicsConfiguration of the peer, and then >> additionally, tweak it in native using the device scale stored in native code. Unfortunately >> this two scale might not be in sync:(after we use the GraphicsConfiguration scale in peer, >> the config might be changed and the tweak in native will use a different screen). >> >> As a fix I have moved all transformation from the peer to the native code, it will be executed >> on the toolkit thread: >> See the change in WWindowPeer.setBounds() and awt_Window.cpp AwtWindow::Reshape >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java.sdiff.html >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html >> I think at some point we should delete all transformation in java, and apply it in the native code only. >> >> >> - We had a special code that tracked the dragging of the window by the user from one screen to another, >> and change the size of the window only when the user stops the drag operation. I've proposed to use standard Windows >> machinery for that via WM_DPICHANGED: https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged >> As a result, Windows will provide the "best" windows bounds on the new screen. Note that the code has a >> workaround for https://bugs.openjdk.java.net/browse/JDK-8249164 >> >> - I've also fix a variation of the bug previously fixed on macOS https://hg.openjdk.java.net/jdk/jdk/rev/b5cdba232fca >> If we try to change the position of the window, and Windows ignores this request then we need to call all "callbacks" manually, otherwise, the shared code will use the bounds ignored by the Windows. >> See the end of void AwtWindow::Reshape(): >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html >> >> - Currently the HW componets such as Canvas scales everything based on such code: >> >> 770 int AwtComponent::ScaleUpX(int x) { >> 4771 int screen = AwtWin32GraphicsDevice::DeviceIndexForWindow(GetHWnd()); >> 4772 Devices::InstanceAccess devices; >> 4773 AwtWin32GraphicsDevice* device = devices->GetDevice(screen); >> 4774 return device == NULL ? x : device->ScaleUpX(x); >> 4775 } >> >> But it does not work well if the smaller part of the top-level window is located on one screen1(DPI=100) but >> the biggest part is located on the screen2(DPI=200). If the Canvas is located on the "smaller" part of the >> window, then the canvas will use DPI=100 for scale, but the whole window will use DPI=200 >> >> As a fix, all HW components will try to use the scale factor of the top-level window, see AwtComponent::GetScreenImOn: >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp.sdiff.html >> >> - Our current implementation does not take care of the case when the HW component bounds are updated when the top-level >> the window is moved to another screen. For example, if the window does not use LayoutManager and the user sets some specific bounds for the Canvas. It is expected that the size of the Canvas will be updated when the window will be moved to another screen, but only HW top-level window and Swing components will update its size. >> >> As a fix I suggest to resync the bounds of the HW components if the GraphicsCOnfiguration is changed, see WComponentPeer.syncBounds(): >> http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java.sdiff.html >> >> - Note that the current fix is for Windows only, but the bug exists on Linux as well, so I have to create a kind of "ifdef" in the >> Robot class, on windows we will use the new logic, on other platforms the old logic will be used. >> >> - The win32GraphicsDevice incorrectly sets the size of the full-screen window. It uses the display mode width/height(which are stored in pixels), but the bounds of the graphics config(which are stored in user's space) should be used. >> >> ======================================================== >> Some other bugs which are not fixed. >> >> - We have a lot of places where we mix(unintentionally) the coordinate in user's space and device space. >> For example when we create the component we read x/y/width/height by the JNI(of course in a user's space) >> but pass this coordinates as-is to the ::CreateWindowEx() which is incorrect. It works currently >> because later we reshape the component to the correct bounds. Will fix it later. >> >> - When the frame is iconized and we try to save a new bounds for the future use, we store the >> coordinates in the user's space to the field which use device space: >> https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp#L664 >> >> Probably there are some other bugs and possibility to cleanups, but I would like to do that in separate issues. >> >> >> ======================================================== >> The tests >> - I have updated a couple of the tests to check multiple screens if possible, it helps to found some bugs >> in my initial implementation >> - Four new tests were added: SetComponentsBounds, SlowMotion, WindowSizeDifferentScreens, FullscreenWindowProps >> - One test is moved from the closed repo(I made a small cleanup of it): ListMultipleSelectTest >> >> ======================================================== >> I have run jck, regression tests in different configurations, when the main screen is on the left, up, down, >> right, and have different DPI such as 100, 125, 150, and 200. No new issues were found so far. >> >> The mach5 is also green. >> >> PS: hope I did not forget some important information, will send it later if any. > > Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: > > - Update WindowSizeDifferentScreens.java > - Update ListMultipleSelectTest.java > - syncBounds code reformat > - javadoc fix for SunGraphicsEnvironment#toDeviceSpace > - Merge branch 'master' into JDK-8211999 > - Apply suggestions from code review > > Co-authored-by: Aleksei Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Merge branch 'master' into JDK-8211999 > - Update FullscreenWindowProps.java > - Merge branch 'master' into JDK-8211999 > - Fix fullscreen in HiDPI mode > - ... and 2 more: https://git.openjdk.java.net/jdk/compare/1a5e6c98...636b7cc4 Marked as reviewed by aivanov (Reviewer). src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java line 357: > 355: * @param config the graphics configuration which bounds are requested > 356: * @return the bounds of the area covered by this > 357: * {@code GraphicsConfiguration} in device space(pixels). Suggestion: * {@code GraphicsConfiguration} in device space (pixels). If changed here, all other similar places should be updated too to keep doc comments consistent. ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From serb at openjdk.java.net Tue Nov 10 18:44:00 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 10 Nov 2020 18:44:00 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v4] In-Reply-To: <5LNG6nKhwE5XoKjIS9E8Sr5x0IxcFYUcszeGcEck87s=.5d5bb638-c044-4b75-899d-758ed21b872e@github.com> References: <5LNG6nKhwE5XoKjIS9E8Sr5x0IxcFYUcszeGcEck87s=.5d5bb638-c044-4b75-899d-758ed21b872e@github.com> Message-ID: On Tue, 10 Nov 2020 09:33:22 GMT, Alexey Ivanov wrote: >> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: >> >> - Update WindowSizeDifferentScreens.java >> - Update ListMultipleSelectTest.java >> - syncBounds code reformat >> - javadoc fix for SunGraphicsEnvironment#toDeviceSpace >> - Merge branch 'master' into JDK-8211999 >> - Apply suggestions from code review >> >> Co-authored-by: Aleksei Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Merge branch 'master' into JDK-8211999 >> - Update FullscreenWindowProps.java >> - Merge branch 'master' into JDK-8211999 >> - Fix fullscreen in HiDPI mode >> - ... and 2 more: https://git.openjdk.java.net/jdk/compare/1a5e6c98...636b7cc4 > > src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java line 357: > >> 355: * @param config the graphics configuration which bounds are requested >> 356: * @return the bounds of the area covered by this >> 357: * {@code GraphicsConfiguration} in device space(pixels). > > Suggestion: > > * {@code GraphicsConfiguration} in device space (pixels). > If changed here, all other similar places should be updated too to keep doc comments consistent. I'll fix it and also merge the master, then update the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From shurailine at openjdk.java.net Tue Nov 10 18:48:03 2020 From: shurailine at openjdk.java.net (Alexandre Iline) Date: Tue, 10 Nov 2020 18:48:03 GMT Subject: RFR: 8253820: Save test images and dumps with timestamps from client sanity suite Message-ID: All screen images and xml dumps, if saved with help of the library methods, are saved by adding a timestamp and a LAF name. This is useful when there is some test re-execution, so all images are preserved and it is clear which image happened first. ------------- Commit messages: - Merge branch 'master' of github.com:openjdk/jdk into JDK-8253820 - Removed unused method. - JDK-8253820 Save test images and dumps with timestamps from client sanity suite Changes: https://git.openjdk.java.net/jdk/pull/1146/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1146&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8253820 Stats: 135 lines in 3 files changed: 40 ins; 49 del; 46 mod Patch: https://git.openjdk.java.net/jdk/pull/1146.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1146/head:pull/1146 PR: https://git.openjdk.java.net/jdk/pull/1146 From shurailine at openjdk.java.net Tue Nov 10 18:48:03 2020 From: shurailine at openjdk.java.net (Alexandre Iline) Date: Tue, 10 Nov 2020 18:48:03 GMT Subject: RFR: 8253820: Save test images and dumps with timestamps from client sanity suite In-Reply-To: References: Message-ID: On Tue, 10 Nov 2020 18:39:58 GMT, Alexandre Iline wrote: > All screen images and xml dumps, if saved with help of the library methods, are saved by adding a timestamp and a LAF name. This is useful when there is some test re-execution, so all images are preserved and it is clear which image happened first. @amresh-sahu , can you take a look? ------------- PR: https://git.openjdk.java.net/jdk/pull/1146 From aivanov at openjdk.java.net Tue Nov 10 19:38:58 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 10 Nov 2020 19:38:58 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v4] In-Reply-To: References: <5LNG6nKhwE5XoKjIS9E8Sr5x0IxcFYUcszeGcEck87s=.5d5bb638-c044-4b75-899d-758ed21b872e@github.com> Message-ID: On Tue, 10 Nov 2020 18:40:45 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java line 357: >> >>> 355: * @param config the graphics configuration which bounds are requested >>> 356: * @return the bounds of the area covered by this >>> 357: * {@code GraphicsConfiguration} in device space(pixels). >> >> Suggestion: >> >> * {@code GraphicsConfiguration} in device space (pixels). >> If changed here, all other similar places should be updated too to keep doc comments consistent. > > I'll fix it and also merge the master, then update the PR. In this case, also consider adding a space between the word and the opening parenthesis in these _coordinates (x, y)_ and _size (w, h)_ and, probably, a space after comma. ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From serb at openjdk.java.net Tue Nov 10 20:38:12 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 10 Nov 2020 20:38:12 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v5] In-Reply-To: References: Message-ID: > Hello. > Please review the fix for jdk. > > Old review request: > https://mail.openjdk.java.net/pipermail/awt-dev/2020-July/015991.html > > > (Note: the fix use API available since Windows 8.1: WM_DPICHANGED, but it should be fine for > Windows 7, because it does not support different DPI for different monitors) > > ======================================================== > Short description: > In the multi-screen configurations when each screen have different DPI > we calculate the bounds of each monitor by these formulas: > > userSpaceBounds = deviceX / scaleX, deviceY / scaleY, deviceW / scaleX, deviceH / scaleY > devSpaceBounds = userX * scaleX, userY * scaleY, userW * scaleX, userH * scaleY > > This formula makes the next configuration completely broken: > - The main screen on the left and 100% DPI > - The second screen on the right and 200% DPI > When we translate the bounds of the config from the device space to the user's space, > the bounds of both screen overlap in the user's space, because we use bounds of > the main screen as-is, and the X/Y of the second screen are divided by the scaleX/Y. > > Since the screens are overlapped we cannot be sure how to translate the user's space > coordinates to device space in the overlapped zone. > As a result => we use the wrong screen > => got wrong coordinates in the device space > => show top-level windows/popups/tooltips/menus/etc on the wrong screen > > The proposed solution for this bug is to change the formulas to these: > > userSpaceBounds = deviceX, deviceY, deviceW / scaleX, deviceH / scaleY > devSpaceBounds = userX, userY, userW * scaleX, userH * scaleY > > In other words, we should not transform the X and Y coordinates of the screen(the top/left corner). This will > complicate the way of how we transform coordinates on the screen: user's <--> device spaces: > > Before the fix: > > userX = deviceX * scaleX; > deviceX = userX / scaleX; > > After the fix(only the part appeared on this screen should be scaled) > > userX = screenX + (deviceX - screenX) * scaleX > deviceX = screenX + (userX - screenX) / scaleX > > Note that these new formulas are applicable only for the coordinates on the screen such as X and Y. > If we will need to calculate the "size" such as W and H then the old formula should be used. > > The main changes for the problem above are: > - Skip transformation of X and Y of the screen bounds: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsConfig.cpp.sdiff.html > - A number of utility methods in java and native: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp.sdiff.html > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java.sdiff.html > > > ======================================================== > Long description: > Unfortunately, the changes above are not enough to fix the problem when different monitors > have different DPI, even if the bounds are *NOT* overlapped. > > - Currently, when we try to set the bounds of the window, we manually convert it in "java" to the > expected device position based on the current GraphicsConfiguration of the peer, and then > additionally, tweak it in native using the device scale stored in native code. Unfortunately > this two scale might not be in sync:(after we use the GraphicsConfiguration scale in peer, > the config might be changed and the tweak in native will use a different screen). > > As a fix I have moved all transformation from the peer to the native code, it will be executed > on the toolkit thread: > See the change in WWindowPeer.setBounds() and awt_Window.cpp AwtWindow::Reshape > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java.sdiff.html > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html > I think at some point we should delete all transformation in java, and apply it in the native code only. > > > - We had a special code that tracked the dragging of the window by the user from one screen to another, > and change the size of the window only when the user stops the drag operation. I've proposed to use standard Windows > machinery for that via WM_DPICHANGED: https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged > As a result, Windows will provide the "best" windows bounds on the new screen. Note that the code has a > workaround for https://bugs.openjdk.java.net/browse/JDK-8249164 > > - I've also fix a variation of the bug previously fixed on macOS https://hg.openjdk.java.net/jdk/jdk/rev/b5cdba232fca > If we try to change the position of the window, and Windows ignores this request then we need to call all "callbacks" manually, otherwise, the shared code will use the bounds ignored by the Windows. > See the end of void AwtWindow::Reshape(): > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html > > - Currently the HW componets such as Canvas scales everything based on such code: > > 770 int AwtComponent::ScaleUpX(int x) { > 4771 int screen = AwtWin32GraphicsDevice::DeviceIndexForWindow(GetHWnd()); > 4772 Devices::InstanceAccess devices; > 4773 AwtWin32GraphicsDevice* device = devices->GetDevice(screen); > 4774 return device == NULL ? x : device->ScaleUpX(x); > 4775 } > > But it does not work well if the smaller part of the top-level window is located on one screen1(DPI=100) but > the biggest part is located on the screen2(DPI=200). If the Canvas is located on the "smaller" part of the > window, then the canvas will use DPI=100 for scale, but the whole window will use DPI=200 > > As a fix, all HW components will try to use the scale factor of the top-level window, see AwtComponent::GetScreenImOn: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp.sdiff.html > > - Our current implementation does not take care of the case when the HW component bounds are updated when the top-level > the window is moved to another screen. For example, if the window does not use LayoutManager and the user sets some specific bounds for the Canvas. It is expected that the size of the Canvas will be updated when the window will be moved to another screen, but only HW top-level window and Swing components will update its size. > > As a fix I suggest to resync the bounds of the HW components if the GraphicsCOnfiguration is changed, see WComponentPeer.syncBounds(): > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java.sdiff.html > > - Note that the current fix is for Windows only, but the bug exists on Linux as well, so I have to create a kind of "ifdef" in the > Robot class, on windows we will use the new logic, on other platforms the old logic will be used. > > - The win32GraphicsDevice incorrectly sets the size of the full-screen window. It uses the display mode width/height(which are stored in pixels), but the bounds of the graphics config(which are stored in user's space) should be used. > > ======================================================== > Some other bugs which are not fixed. > > - We have a lot of places where we mix(unintentionally) the coordinate in user's space and device space. > For example when we create the component we read x/y/width/height by the JNI(of course in a user's space) > but pass this coordinates as-is to the ::CreateWindowEx() which is incorrect. It works currently > because later we reshape the component to the correct bounds. Will fix it later. > > - When the frame is iconized and we try to save a new bounds for the future use, we store the > coordinates in the user's space to the field which use device space: > https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp#L664 > > Probably there are some other bugs and possibility to cleanups, but I would like to do that in separate issues. > > > ======================================================== > The tests > - I have updated a couple of the tests to check multiple screens if possible, it helps to found some bugs > in my initial implementation > - Four new tests were added: SetComponentsBounds, SlowMotion, WindowSizeDifferentScreens, FullscreenWindowProps > - One test is moved from the closed repo(I made a small cleanup of it): ListMultipleSelectTest > > ======================================================== > I have run jck, regression tests in different configurations, when the main screen is on the left, up, down, > right, and have different DPI such as 100, 125, 150, and 200. No new issues were found so far. > > The mach5 is also green. > > PS: hope I did not forget some important information, will send it later if any. Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits: - Update SunGraphicsEnvironment.java - Merge branch 'master' into JDK-8211999 - Update WindowSizeDifferentScreens.java - Update ListMultipleSelectTest.java - syncBounds code reformat - javadoc fix for SunGraphicsEnvironment#toDeviceSpace - Merge branch 'master' into JDK-8211999 - Apply suggestions from code review Co-authored-by: Aleksei Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Merge branch 'master' into JDK-8211999 - Update FullscreenWindowProps.java - ... and 4 more: https://git.openjdk.java.net/jdk/compare/a7f46919...fd238ef6 ------------- Changes: https://git.openjdk.java.net/jdk/pull/375/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=375&range=04 Stats: 1393 lines in 35 files changed: 962 ins; 276 del; 155 mod Patch: https://git.openjdk.java.net/jdk/pull/375.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/375/head:pull/375 PR: https://git.openjdk.java.net/jdk/pull/375 From serb at openjdk.java.net Tue Nov 10 20:38:12 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 10 Nov 2020 20:38:12 GMT Subject: RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v4] In-Reply-To: References: <5LNG6nKhwE5XoKjIS9E8Sr5x0IxcFYUcszeGcEck87s=.5d5bb638-c044-4b75-899d-758ed21b872e@github.com> Message-ID: On Tue, 10 Nov 2020 19:35:58 GMT, Alexey Ivanov wrote: >> I'll fix it and also merge the master, then update the PR. > > In this case, also consider adding a space between the word and the opening parenthesis in these _coordinates (x, y)_ and _size (w, h)_ and, probably, a space after comma. Spaces are added. ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From serb at openjdk.java.net Wed Nov 11 01:34:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 11 Nov 2020 01:34:57 GMT Subject: Integrated: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) In-Reply-To: References: Message-ID: <6xdyT0w04J4Q21Cy5LLc2gRnOjyjCHgvDzV6tn9g1KI=.c549d830-c144-4d8e-b4be-464ff836ced0@github.com> On Sun, 27 Sep 2020 22:16:22 GMT, Sergey Bylokhov wrote: > Hello. > Please review the fix for jdk. > > Old review request: > https://mail.openjdk.java.net/pipermail/awt-dev/2020-July/015991.html > > > (Note: the fix use API available since Windows 8.1: WM_DPICHANGED, but it should be fine for > Windows 7, because it does not support different DPI for different monitors) > > ======================================================== > Short description: > In the multi-screen configurations when each screen have different DPI > we calculate the bounds of each monitor by these formulas: > > userSpaceBounds = deviceX / scaleX, deviceY / scaleY, deviceW / scaleX, deviceH / scaleY > devSpaceBounds = userX * scaleX, userY * scaleY, userW * scaleX, userH * scaleY > > This formula makes the next configuration completely broken: > - The main screen on the left and 100% DPI > - The second screen on the right and 200% DPI > When we translate the bounds of the config from the device space to the user's space, > the bounds of both screen overlap in the user's space, because we use bounds of > the main screen as-is, and the X/Y of the second screen are divided by the scaleX/Y. > > Since the screens are overlapped we cannot be sure how to translate the user's space > coordinates to device space in the overlapped zone. > As a result => we use the wrong screen > => got wrong coordinates in the device space > => show top-level windows/popups/tooltips/menus/etc on the wrong screen > > The proposed solution for this bug is to change the formulas to these: > > userSpaceBounds = deviceX, deviceY, deviceW / scaleX, deviceH / scaleY > devSpaceBounds = userX, userY, userW * scaleX, userH * scaleY > > In other words, we should not transform the X and Y coordinates of the screen(the top/left corner). This will > complicate the way of how we transform coordinates on the screen: user's <--> device spaces: > > Before the fix: > > userX = deviceX * scaleX; > deviceX = userX / scaleX; > > After the fix(only the part appeared on this screen should be scaled) > > userX = screenX + (deviceX - screenX) * scaleX > deviceX = screenX + (userX - screenX) / scaleX > > Note that these new formulas are applicable only for the coordinates on the screen such as X and Y. > If we will need to calculate the "size" such as W and H then the old formula should be used. > > The main changes for the problem above are: > - Skip transformation of X and Y of the screen bounds: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsConfig.cpp.sdiff.html > - A number of utility methods in java and native: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp.sdiff.html > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java.sdiff.html > > > ======================================================== > Long description: > Unfortunately, the changes above are not enough to fix the problem when different monitors > have different DPI, even if the bounds are *NOT* overlapped. > > - Currently, when we try to set the bounds of the window, we manually convert it in "java" to the > expected device position based on the current GraphicsConfiguration of the peer, and then > additionally, tweak it in native using the device scale stored in native code. Unfortunately > this two scale might not be in sync:(after we use the GraphicsConfiguration scale in peer, > the config might be changed and the tweak in native will use a different screen). > > As a fix I have moved all transformation from the peer to the native code, it will be executed > on the toolkit thread: > See the change in WWindowPeer.setBounds() and awt_Window.cpp AwtWindow::Reshape > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java.sdiff.html > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html > I think at some point we should delete all transformation in java, and apply it in the native code only. > > > - We had a special code that tracked the dragging of the window by the user from one screen to another, > and change the size of the window only when the user stops the drag operation. I've proposed to use standard Windows > machinery for that via WM_DPICHANGED: https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged > As a result, Windows will provide the "best" windows bounds on the new screen. Note that the code has a > workaround for https://bugs.openjdk.java.net/browse/JDK-8249164 > > - I've also fix a variation of the bug previously fixed on macOS https://hg.openjdk.java.net/jdk/jdk/rev/b5cdba232fca > If we try to change the position of the window, and Windows ignores this request then we need to call all "callbacks" manually, otherwise, the shared code will use the bounds ignored by the Windows. > See the end of void AwtWindow::Reshape(): > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp.sdiff.html > > - Currently the HW componets such as Canvas scales everything based on such code: > > 770 int AwtComponent::ScaleUpX(int x) { > 4771 int screen = AwtWin32GraphicsDevice::DeviceIndexForWindow(GetHWnd()); > 4772 Devices::InstanceAccess devices; > 4773 AwtWin32GraphicsDevice* device = devices->GetDevice(screen); > 4774 return device == NULL ? x : device->ScaleUpX(x); > 4775 } > > But it does not work well if the smaller part of the top-level window is located on one screen1(DPI=100) but > the biggest part is located on the screen2(DPI=200). If the Canvas is located on the "smaller" part of the > window, then the canvas will use DPI=100 for scale, but the whole window will use DPI=200 > > As a fix, all HW components will try to use the scale factor of the top-level window, see AwtComponent::GetScreenImOn: > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp.sdiff.html > > - Our current implementation does not take care of the case when the HW component bounds are updated when the top-level > the window is moved to another screen. For example, if the window does not use LayoutManager and the user sets some specific bounds for the Canvas. It is expected that the size of the Canvas will be updated when the window will be moved to another screen, but only HW top-level window and Swing components will update its size. > > As a fix I suggest to resync the bounds of the HW components if the GraphicsCOnfiguration is changed, see WComponentPeer.syncBounds(): > http://cr.openjdk.java.net/~serb/8211999/webrev.04/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java.sdiff.html > > - Note that the current fix is for Windows only, but the bug exists on Linux as well, so I have to create a kind of "ifdef" in the > Robot class, on windows we will use the new logic, on other platforms the old logic will be used. > > - The win32GraphicsDevice incorrectly sets the size of the full-screen window. It uses the display mode width/height(which are stored in pixels), but the bounds of the graphics config(which are stored in user's space) should be used. > > ======================================================== > Some other bugs which are not fixed. > > - We have a lot of places where we mix(unintentionally) the coordinate in user's space and device space. > For example when we create the component we read x/y/width/height by the JNI(of course in a user's space) > but pass this coordinates as-is to the ::CreateWindowEx() which is incorrect. It works currently > because later we reshape the component to the correct bounds. Will fix it later. > > - When the frame is iconized and we try to save a new bounds for the future use, we store the > coordinates in the user's space to the field which use device space: > https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp#L664 > > Probably there are some other bugs and possibility to cleanups, but I would like to do that in separate issues. > > > ======================================================== > The tests > - I have updated a couple of the tests to check multiple screens if possible, it helps to found some bugs > in my initial implementation > - Four new tests were added: SetComponentsBounds, SlowMotion, WindowSizeDifferentScreens, FullscreenWindowProps > - One test is moved from the closed repo(I made a small cleanup of it): ListMultipleSelectTest > > ======================================================== > I have run jck, regression tests in different configurations, when the main screen is on the left, up, down, > right, and have different DPI such as 100, 125, 150, and 200. No new issues were found so far. > > The mach5 is also green. > > PS: hope I did not forget some important information, will send it later if any. This pull request has now been integrated. Changeset: be635258 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/be635258 Stats: 1393 lines in 35 files changed: 962 ins; 276 del; 155 mod 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) Reviewed-by: kizune, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/375 From serb at openjdk.java.net Wed Nov 11 01:42:02 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 11 Nov 2020 01:42:02 GMT Subject: RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v5] In-Reply-To: References: Message-ID: On Mon, 9 Nov 2020 04:04:09 GMT, Prasanta Sadhukhan wrote: >> Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. >> Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Address review comment Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From serb at openjdk.java.net Wed Nov 11 03:41:00 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 11 Nov 2020 03:41:00 GMT Subject: RFR: 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out [v2] In-Reply-To: References: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> Message-ID: On Tue, 10 Nov 2020 04:14:15 GMT, Prasanta Sadhukhan wrote: >> This test has failed in one of jdk nightly testing although it always passed locally. Made the test use robot delays, waitForIdle() to make it more stable and appropriate to run in slower mach5 systems and also remove the dependancy on ExtendedRobot. >> Mach5 job has been run for several iterations in all platforms. Link in JBS. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Marked volatile Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1115 From kizune at openjdk.java.net Wed Nov 11 05:49:56 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 11 Nov 2020 05:49:56 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> <2kVgnn_UFxXNRs_LF49yBjzIC-XSdscyPd4cgwhHX6A=.66ef68f4-ec8c-4446-a578-d1b420522eda@github.com> <6Yshz_j4vL9vPCT_fbWebxmv6IGKKug7ZolO2GDVw0Q=.2d582579-25e9-4008-b073-1d608378d42c@github.com> Message-ID: On Tue, 10 Nov 2020 02:48:19 GMT, Sergey Bylokhov wrote: >> The code block here with uninstall is called if currently installed LAF is not derived from BasicLAF in which case we will not have this problem in the first place - the only place where we are setting menuInputMap variable is in this method down the line so it never gets initialized. And no, calling uninstall() unconditionally will not solve the problem because uninstall() does not change this value either. > > I guess that the uninstall() above is called when the L&F was basic(since BasicPopupMenuUI is used) and then changed for some reason, so when the method in the BasicPopupMenuUI.java will be called we will find that the current L&F is different and call "uninstall()", so this is my question: will the leak will exist in that case? I mean the code changed by the current fix will not be executed since we will exit after "uninstall()". Well, yes it is called when it is changed from basic to some custom LaF not inherited by basic (i am not aware of any of such - but oh, well) and in this case once we remove MenuKeyboardHelper reference from the listener lists with uninstall() there will be no reference to this class from anywhere else - because it is referenced within the BasicPopupMenuUI and it is uninstalled. And if we have new LaF not inherited from basic LaF installed and instances of BasicPopupMenuUI are still referenced somewhere - well, yes, we will have a memory leak, but not because of this tiny variable - we will have much bigger problem on our hands. ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From serb at openjdk.java.net Wed Nov 11 06:02:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 11 Nov 2020 06:02:57 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Mon, 9 Nov 2020 12:03:11 GMT, Alexander Zuev wrote: >> 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Test case made multiplatform and testing all the LaF's Looks fine. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1035 From serb at openjdk.java.net Wed Nov 11 06:22:05 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 11 Nov 2020 06:22:05 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize Message-ID: The typo in the MetalRootLayout is fixed. The tpWidth was replaced by the tpHeight for height calculation. ------------- Commit messages: - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1155/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1155&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-4916923 Stats: 126 lines in 2 files changed: 117 ins; 0 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/1155.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1155/head:pull/1155 PR: https://git.openjdk.java.net/jdk/pull/1155 From psadhukhan at openjdk.java.net Wed Nov 11 07:31:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 11 Nov 2020 07:31:57 GMT Subject: RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2] In-Reply-To: References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Mon, 9 Nov 2020 12:03:11 GMT, Alexander Zuev wrote: >> 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Test case made multiplatform and testing all the LaF's Looks ok. Just one minor comment in the test, since we are anyway using robot, it's better to use robot.delay() than Thread.sleep() unless if you have some compelling reason not to do that. ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1035 From psadhukhan at openjdk.java.net Wed Nov 11 08:06:09 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 11 Nov 2020 08:06:09 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors Message-ID: Issue is a JLabel with a translucent foreground color properly renders plain text, but with HTML text, the alpha component is discarded and the text is rendered using an opaque color. As per https://www.w3schools.com/cssref/func_rgba.asp, CSS supports rgba() to support alpha and render translucent text color but support for rgba() is not present in JDK html text rendering. Added support for rgba() to render translucent text color. ------------- Commit messages: - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1158/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1158&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256019 Stats: 251 lines in 5 files changed: 224 ins; 2 del; 25 mod Patch: https://git.openjdk.java.net/jdk/pull/1158.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1158/head:pull/1158 PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Wed Nov 11 08:06:10 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 11 Nov 2020 08:06:10 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors In-Reply-To: References: Message-ID: <2L1bXyzzioM0GGzPVTqfPGqi1G4NPlmgl9GtLz_rr58=.dace28e9-a6f0-4e9f-835b-9de7fc9f6902@github.com> On Wed, 11 Nov 2020 08:00:09 GMT, Prasanta Sadhukhan wrote: > Issue is a JLabel with a translucent foreground color properly renders plain text, but with HTML text, the alpha component is discarded and the text is rendered using an opaque color. > As per https://www.w3schools.com/cssref/func_rgba.asp, CSS supports rgba() to support alpha and render translucent text color > but support for rgba() is not present in JDK html text rendering. > > Added support for rgba() to render translucent text color. src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 76: > 74: } > 75: col = new Color(Integer.parseInt(color[0]), Integer.parseInt(color[1]), > 76: Integer.parseInt(color[2]), (int)(Float.parseFloat(color[3])*255)); It seems OceanTheme in Metal L&F supports only rgb `ColorUIResource CONTROL_TEXT_COLOR = new PrintColorUIResource(0x333333, Color.BLACK)` so even when Color(r,g,b,a) is used, it creates rgb color and not rgba so alpha is obtained and passed separately. ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Wed Nov 11 08:09:59 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 11 Nov 2020 08:09:59 GMT Subject: Integrated: 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out In-Reply-To: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> References: <6eov1ILcclPgMfsnI9-AuQrKZhJSSZvxNowYJhZHXwU=.9a602c3c-82a2-454d-beb5-2e26d81553a0@github.com> Message-ID: On Mon, 9 Nov 2020 08:34:24 GMT, Prasanta Sadhukhan wrote: > This test has failed in one of jdk nightly testing although it always passed locally. Made the test use robot delays, waitForIdle() to make it more stable and appropriate to run in slower mach5 systems and also remove the dependancy on ExtendedRobot. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: 35284e46 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/35284e46 Stats: 66 lines in 1 file changed: 12 ins; 23 del; 31 mod 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/1115 From psadhukhan at openjdk.java.net Wed Nov 11 08:12:04 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 11 Nov 2020 08:12:04 GMT Subject: Integrated: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac In-Reply-To: References: Message-ID: <_LncOQ9wRG-A55ugg4cRIhhdX-VG_spIuymS2HN_aZI=.f23fe1cb-0f93-4a75-b5ce-a1a62aba758d@github.com> On Fri, 30 Oct 2020 11:42:53 GMT, Prasanta Sadhukhan wrote: > Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300. > Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030. > Mach5 job has been run for several iterations in all platforms. Link in JBS. This pull request has now been integrated. Changeset: 5181f9ce Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/5181f9ce Stats: 27 lines in 2 files changed: 18 ins; 1 del; 8 mod 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/955 From kizune at openjdk.java.net Wed Nov 11 11:47:01 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 11 Nov 2020 11:47:01 GMT Subject: Integrated: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper In-Reply-To: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> References: <_EqDyPXhK4t_zt1Gcdx4dSGj0sKB7AdLC3T7F-Elhvg=.5470e2d2-dc1d-438d-8e0b-72f92ba0440d@github.com> Message-ID: On Tue, 3 Nov 2020 10:32:01 GMT, Alexander Zuev wrote: > 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper This pull request has now been integrated. Changeset: ed615e3c Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/ed615e3c Stats: 216 lines in 3 files changed: 215 ins; 0 del; 1 mod 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Reviewed-by: psadhukhan, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/1035 From psadhukhan at openjdk.java.net Thu Nov 12 10:06:04 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 12 Nov 2020 10:06:04 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible Message-ID: On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. ------------- Commit messages: - 8251377: [macos11] JTabbedPane selected tab text is barely legible Changes: https://git.openjdk.java.net/jdk/pull/1182/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8251377 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1182/head:pull/1182 PR: https://git.openjdk.java.net/jdk/pull/1182 From shurailine at openjdk.java.net Thu Nov 12 18:01:59 2020 From: shurailine at openjdk.java.net (Alexandre Iline) Date: Thu, 12 Nov 2020 18:01:59 GMT Subject: RFR: 8253820: Save test images and dumps with timestamps from client sanity suite In-Reply-To: References: Message-ID: On Tue, 10 Nov 2020 18:40:45 GMT, Alexandre Iline wrote: >> All screen images and xml dumps, if saved with help of the library methods, are saved by adding a timestamp and a LAF name. This is useful when there is some test re-execution, so all images are preserved and it is clear which image happened first. > > @amresh-sahu , can you take a look? @mrserb Can you review? ------------- PR: https://git.openjdk.java.net/jdk/pull/1146 From herrick at openjdk.java.net Thu Nov 12 18:32:02 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Thu, 12 Nov 2020 18:32:02 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs In-Reply-To: References: Message-ID: On Mon, 9 Nov 2020 13:56:33 GMT, Andy Herrick wrote: > JDK-8189198: Add "forRemoval = true" to Applet APIs preliminary changes for JDK-8189198 for evaluation ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From herrick at openjdk.java.net Thu Nov 12 18:32:02 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Thu, 12 Nov 2020 18:32:02 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs Message-ID: JDK-8189198: Add "forRemoval = true" to Applet APIs ------------- Commit messages: - Merge branch 'master' into JDK-8189198 - JDK-8189198: Add "forRemoval = true" to Applet APIs - JDK-8189198: Add "forRemoval = true" to Applet APIs - JDK-8189198: Add "forRemoval = true" to Applet APIs Changes: https://git.openjdk.java.net/jdk/pull/1127/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8189198 Stats: 61 lines in 20 files changed: 10 ins; 0 del; 51 mod Patch: https://git.openjdk.java.net/jdk/pull/1127.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1127/head:pull/1127 PR: https://git.openjdk.java.net/jdk/pull/1127 From kcr at openjdk.java.net Thu Nov 12 19:22:01 2020 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Thu, 12 Nov 2020 19:22:01 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs In-Reply-To: References: Message-ID: On Mon, 9 Nov 2020 13:57:32 GMT, Andy Herrick wrote: >> JDK-8189198: Add "forRemoval = true" to Applet APIs > > preliminary changes for JDK-8189198 for evaluation The following field, which is currently deprecated (not for removal) should probably also be marked as deprecated for removal:: javax.naming.Context: static final String APPLET The CSR and JEP should be updated accordingly. Also, what about the following? javax.swing.text.html.parser.DTD Element applet ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From iris at openjdk.java.net Thu Nov 12 19:40:54 2020 From: iris at openjdk.java.net (Iris Clark) Date: Thu, 12 Nov 2020 19:40:54 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs In-Reply-To: References: Message-ID: <1hu3mjRsBg1gnnWXUNl9TQ8PoPFjmGOaXkr6Vdd4mOo=.7ead6f18-6b34-42e4-adfb-756ada49eb61@github.com> On Mon, 9 Nov 2020 13:56:33 GMT, Andy Herrick wrote: > JDK-8189198: Add "forRemoval = true" to Applet APIs Since all APIs in the java.applet package are deprecated "forRemoval = true", consider adding a brief deprecation note to java/applet/package-info.java too. As an example, when all of the APIs in package java.rmi.activation were similarly deprecated in JDK 15, the following note was added: https://docs.oracle.com/en/java/javase/15/docs/api/java.rmi/java/rmi/activation/package-summary.html . Thanks! Iris ------------- Marked as reviewed by iris (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1127 From herrick at openjdk.java.net Thu Nov 12 20:48:13 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Thu, 12 Nov 2020 20:48:13 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2] In-Reply-To: References: Message-ID: > JDK-8189198: Add "forRemoval = true" to Applet APIs Andy Herrick has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - JDK-8189198: Add "forRemoval = true" to Applet APIs - Merge branch 'master' into JDK-8189198 - Merge branch 'master' into JDK-8189198 - JDK-8189198: Add "forRemoval = true" to Applet APIs - JDK-8189198: Add "forRemoval = true" to Applet APIs - JDK-8189198: Add "forRemoval = true" to Applet APIs ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1127/files - new: https://git.openjdk.java.net/jdk/pull/1127/files/a74deeee..d9850cd8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=00-01 Stats: 7753 lines in 89 files changed: 4891 ins; 1603 del; 1259 mod Patch: https://git.openjdk.java.net/jdk/pull/1127.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1127/head:pull/1127 PR: https://git.openjdk.java.net/jdk/pull/1127 From almatvee at openjdk.java.net Thu Nov 12 23:52:56 2020 From: almatvee at openjdk.java.net (Alexander Matveev) Date: Thu, 12 Nov 2020 23:52:56 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2] In-Reply-To: References: Message-ID: On Thu, 12 Nov 2020 20:48:13 GMT, Andy Herrick wrote: >> JDK-8189198: Add "forRemoval = true" to Applet APIs > > Andy Herrick has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - Merge branch 'master' into JDK-8189198 > - Merge branch 'master' into JDK-8189198 > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - JDK-8189198: Add "forRemoval = true" to Applet APIs Marked as reviewed by almatvee (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From serb at openjdk.java.net Fri Nov 13 00:26:55 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 13 Nov 2020 00:26:55 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: Message-ID: On Thu, 12 Nov 2020 09:58:36 GMT, Prasanta Sadhukhan wrote: > On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, > Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 332: > 330: final ColorUIResource selectedTabTitleNormalColor = > 331: System.getProperty("os.version").contains("10.16") ? > 332: new ColorUIResource(Color.lightGray) : white; Can we read this information from the native? Probably it is already accessed by the SystemColor? ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From kcr at openjdk.java.net Fri Nov 13 00:27:58 2020 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 13 Nov 2020 00:27:58 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs In-Reply-To: References: Message-ID: On Mon, 9 Nov 2020 13:56:33 GMT, Andy Herrick wrote: > JDK-8189198: Add "forRemoval = true" to Applet APIs @andyherrick can you enter the `/csr needed` command? I would, but it needs to be done by either the author of the PR or a Reviewer. ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From serb at openjdk.java.net Fri Nov 13 02:05:53 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 13 Nov 2020 02:05:53 GMT Subject: RFR: 8253820: Save test images and dumps with timestamps from client sanity suite In-Reply-To: References: Message-ID: On Tue, 10 Nov 2020 18:39:58 GMT, Alexandre Iline wrote: > All screen images and xml dumps, if saved with help of the library methods, are saved by adding a timestamp and a LAF name. This is useful when there is some test re-execution, so all images are preserved and it is clear which image happened first. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1146 From shurailine at openjdk.java.net Fri Nov 13 02:30:55 2020 From: shurailine at openjdk.java.net (Alexandre Iline) Date: Fri, 13 Nov 2020 02:30:55 GMT Subject: Integrated: 8253820: Save test images and dumps with timestamps from client sanity suite In-Reply-To: References: Message-ID: <3XR0xFVyzTtbH91e0NOx_ymlbaRSD_e71khoQqPslA8=.ac704145-5c5f-4bb8-8304-a2a915f84832@github.com> On Tue, 10 Nov 2020 18:39:58 GMT, Alexandre Iline wrote: > All screen images and xml dumps, if saved with help of the library methods, are saved by adding a timestamp and a LAF name. This is useful when there is some test re-execution, so all images are preserved and it is clear which image happened first. This pull request has now been integrated. Changeset: e32a4ea4 Author: Alexandre Iline URL: https://git.openjdk.java.net/jdk/commit/e32a4ea4 Stats: 135 lines in 3 files changed: 40 ins; 49 del; 46 mod 8253820: Save test images and dumps with timestamps from client sanity suite Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/1146 From psadhukhan at openjdk.java.net Fri Nov 13 02:41:59 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 13 Nov 2020 02:41:59 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: Message-ID: On Fri, 13 Nov 2020 00:24:00 GMT, Sergey Bylokhov wrote: >> On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, >> Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. > > src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 332: > >> 330: final ColorUIResource selectedTabTitleNormalColor = >> 331: System.getProperty("os.version").contains("10.16") ? >> 332: new ColorUIResource(Color.lightGray) : white; > > Can we read this information from the native? Probably it is already accessed by the SystemColor? What "information" you want to be read from native? ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Fri Nov 13 07:21:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 13 Nov 2020 07:21:57 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: Message-ID: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> On Fri, 13 Nov 2020 02:39:29 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 332: >> >>> 330: final ColorUIResource selectedTabTitleNormalColor = >>> 331: System.getProperty("os.version").contains("10.16") ? >>> 332: new ColorUIResource(Color.lightGray) : white; >> >> Can we read this information from the native? Probably it is already accessed by the SystemColor? > > What "information" you want to be read from native? The color instead of hardcoded "Color.lightGray" ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Fri Nov 13 09:31:56 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 13 Nov 2020 09:31:56 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> References: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> Message-ID: On Fri, 13 Nov 2020 07:18:45 GMT, Sergey Bylokhov wrote: >> What "information" you want to be read from native? > > The color instead of hardcoded "Color.lightGray" Well, even "white" was hardcoded till now...so I am not sure how can we read the color from native...do you have any idea? Even CsystemColors.m has all the color hardcoded sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor blackColor]; ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From alanb at openjdk.java.net Fri Nov 13 09:35:00 2020 From: alanb at openjdk.java.net (Alan Bateman) Date: Fri, 13 Nov 2020 09:35:00 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2] In-Reply-To: References: Message-ID: <3GqHzIv1CUYpxhZUBOoX5m2C2a-E9h_N77-MxvYKUQY=.3a9aa402-2e45-4d8c-a513-fb1e65157fbe@github.com> On Thu, 12 Nov 2020 20:48:13 GMT, Andy Herrick wrote: >> JDK-8189198: Add "forRemoval = true" to Applet APIs > > Andy Herrick has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - Merge branch 'master' into JDK-8189198 > - Merge branch 'master' into JDK-8189198 > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - JDK-8189198: Add "forRemoval = true" to Applet APIs > - JDK-8189198: Add "forRemoval = true" to Applet APIs src/java.naming/share/classes/javax/naming/Context.java line 1087: > 1085: @Deprecated(since="16", forRemoval=true) > 1086: String APPLET = "java.naming.applet"; > 1087: }; Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the enhanced deprecation work). ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From psadhukhan at openjdk.java.net Fri Nov 13 10:10:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 13 Nov 2020 10:10:57 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> Message-ID: On Fri, 13 Nov 2020 09:29:38 GMT, Prasanta Sadhukhan wrote: >> The color instead of hardcoded "Color.lightGray" > > Well, even "white" was hardcoded till now...so I am not sure how can we read the color from native...do you have any idea? > Even CsystemColors.m has all the color hardcoded > sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor blackColor]; I dont think SystemColors are used in macos. I see in loadSystemColors() is commented in AquaLookAndFeel.java, therefore loadNativeColors() defined in LWCToolkit.m is not used. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From herrick at openjdk.java.net Fri Nov 13 15:05:15 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Fri, 13 Nov 2020 15:05:15 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3] In-Reply-To: References: Message-ID: > JDK-8189198: Add "forRemoval = true" to Applet APIs Andy Herrick has updated the pull request incrementally with one additional commit since the last revision: JDK-8189198: Add "forRemoval = true" to Applet APIs ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1127/files - new: https://git.openjdk.java.net/jdk/pull/1127/files/d9850cd8..c6ea7714 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=01-02 Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1127.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1127/head:pull/1127 PR: https://git.openjdk.java.net/jdk/pull/1127 From kcr at openjdk.java.net Fri Nov 13 18:03:59 2020 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 13 Nov 2020 18:03:59 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2] In-Reply-To: <3GqHzIv1CUYpxhZUBOoX5m2C2a-E9h_N77-MxvYKUQY=.3a9aa402-2e45-4d8c-a513-fb1e65157fbe@github.com> References: <3GqHzIv1CUYpxhZUBOoX5m2C2a-E9h_N77-MxvYKUQY=.3a9aa402-2e45-4d8c-a513-fb1e65157fbe@github.com> Message-ID: On Fri, 13 Nov 2020 09:31:53 GMT, Alan Bateman wrote: >> Andy Herrick has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: >> >> - JDK-8189198: Add "forRemoval = true" to Applet APIs >> - Merge branch 'master' into JDK-8189198 >> - Merge branch 'master' into JDK-8189198 >> - JDK-8189198: Add "forRemoval = true" to Applet APIs >> - JDK-8189198: Add "forRemoval = true" to Applet APIs >> - JDK-8189198: Add "forRemoval = true" to Applet APIs > > src/java.naming/share/classes/javax/naming/Context.java line 1087: > >> 1085: @Deprecated(since="16", forRemoval=true) >> 1086: String APPLET = "java.naming.applet"; >> 1087: }; > > Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the enhanced deprecation work). Good point, since it was in fact deprecated in 9. ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From kcr at openjdk.java.net Fri Nov 13 18:23:02 2020 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 13 Nov 2020 18:23:02 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3] In-Reply-To: References: Message-ID: <2YW5WLSFQN87oSb4c-t2jsiflm8TmSyLH_ByIc9lq2U=.647a0363-4fea-4550-bb90-91603e5b842c@github.com> On Fri, 13 Nov 2020 15:05:15 GMT, Andy Herrick wrote: >> JDK-8189198: Add "forRemoval = true" to Applet APIs > > Andy Herrick has updated the pull request incrementally with one additional commit since the last revision: > > JDK-8189198: Add "forRemoval = true" to Applet APIs src/java.desktop/share/classes/java/applet/package-info.java line 40: > 38: *

> 39: * Deprecated. > 40: * This package has been deprecated and may be removed in a future version of the Java Platform. That should be `@deprecated This package ...`. See [java/rmi/activation/package-info.java#L41](https://github.com/openjdk/jdk/blob/master/src/java.rmi/share/classes/java/rmi/activation/package-info.java#L41). ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From herrick at openjdk.java.net Fri Nov 13 18:22:59 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Fri, 13 Nov 2020 18:22:59 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2] In-Reply-To: References: <3GqHzIv1CUYpxhZUBOoX5m2C2a-E9h_N77-MxvYKUQY=.3a9aa402-2e45-4d8c-a513-fb1e65157fbe@github.com> Message-ID: On Fri, 13 Nov 2020 18:01:18 GMT, Kevin Rushforth wrote: >> src/java.naming/share/classes/javax/naming/Context.java line 1087: >> >>> 1085: @Deprecated(since="16", forRemoval=true) >>> 1086: String APPLET = "java.naming.applet"; >>> 1087: }; >> >> Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the enhanced deprecation work). > > Good point, since it was in fact deprecated in 9. yes - changed to since="9" this morning ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From serb at openjdk.java.net Fri Nov 13 23:19:55 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 13 Nov 2020 23:19:55 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> Message-ID: On Fri, 13 Nov 2020 10:07:57 GMT, Prasanta Sadhukhan wrote: >> Well, even "white" was hardcoded till now...so I am not sure how can we read the color from native...do you have any idea? >> Even CsystemColors.m has all the color hardcoded >> sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor blackColor]; > > I dont think SystemColors are used in macos. I see in loadSystemColors() is commented in AquaLookAndFeel.java, therefore > loadNativeColors() defined in LWCToolkit.m is not used. > Well, even "white" was hardcoded till now...so I am not sure how can we read the color from native...do you have any idea? The usage of the hardcoded white color was a bug, and it was found by the JDK-8251377. It would be good to investigate how to read the color of the text in the JTabbedPane(Or probably that color is used in some other components as well) from the native. > I dont think SystemColors are used in macos. I see in loadSystemColors() is commented in AquaLookAndFeel.java, therefore loadNativeColors() defined in LWCToolkit.m is not used. SystemColors/LWCToolkit#loadNativeColors are for sure works on macOS it is responsible for the text selection color for example. > Even CsystemColors.m has all the color hardcoded > sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor blackColor]; All that hardcoded colors are bugs, but some of them use non-hardcoded values like: textColor/disabledControlTextColor/controlShadowColor/controlBackgroundColor/etc ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Fri Nov 13 23:29:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 13 Nov 2020 23:29:59 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3] In-Reply-To: <2YW5WLSFQN87oSb4c-t2jsiflm8TmSyLH_ByIc9lq2U=.647a0363-4fea-4550-bb90-91603e5b842c@github.com> References: <2YW5WLSFQN87oSb4c-t2jsiflm8TmSyLH_ByIc9lq2U=.647a0363-4fea-4550-bb90-91603e5b842c@github.com> Message-ID: On Fri, 13 Nov 2020 18:20:37 GMT, Kevin Rushforth wrote: >> Andy Herrick has updated the pull request incrementally with one additional commit since the last revision: >> >> JDK-8189198: Add "forRemoval = true" to Applet APIs > > src/java.desktop/share/classes/java/applet/package-info.java line 40: > >> 38: *

>> 39: * Deprecated. >> 40: * This package has been deprecated and may be removed in a future version of the Java Platform. > > That should be `@deprecated This package ...`. See [java/rmi/activation/package-info.java#L41](https://github.com/openjdk/jdk/blob/master/src/java.rmi/share/classes/java/rmi/activation/package-info.java#L41). The deprecation description should point to the new API which might be used instead of the deprecated ones. So the text "deprecated without replacement" was intentionally added, it will be good to preserve it. ------------- PR: https://git.openjdk.java.net/jdk/pull/1127 From herrick at openjdk.java.net Sun Nov 15 19:09:07 2020 From: herrick at openjdk.java.net (Andy Herrick) Date: Sun, 15 Nov 2020 19:09:07 GMT Subject: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v4] In-Reply-To: References: Message-ID: > JDK-8189198: Add "forRemoval = true" to Applet APIs Andy Herrick has updated the pull request incrementally with one additional commit since the last revision: JDK-8189198: Add "forRemoval = true" to Applet APIs ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1127/files - new: https://git.openjdk.java.net/jdk/pull/1127/files/c6ea7714..bc781bea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=02-03 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/1127.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1127/head:pull/1127 PR: https://git.openjdk.java.net/jdk/pull/1127 From serb at openjdk.java.net Mon Nov 16 20:30:14 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 16 Nov 2020 20:30:14 GMT Subject: RFR: 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows In-Reply-To: References: Message-ID: On Mon, 16 Nov 2020 20:01:49 GMT, Sergey Bylokhov wrote: > The Windows L&F uses the windows specific class XPStyle as part of the border in the JSpinner. This class cannot be serialized and causes an exception during serialization. The root cause is that BasicSpinnerUI forgot to reset the border in uninstallUI() by the LookAndFeel.uninstallBorder(). I have found one more place where the LookAndFeel.installBorder() is not followed by the LookAndFeel.uninstallBorder() in the AquaSpinnerUI. test/jdk/javax/swing/JSpinner/SerializationTest.java line 44: > 42: * @summary Verifies that JSpinner can be serialized/deserialized correctly. > 43: * @run main/othervm SerializationTest > 44: * @run main/othervm -Djava.awt.headless=true SerializationTest The test will cover the old use case(headless) and the headful as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/1234 From serb at openjdk.java.net Mon Nov 16 20:30:13 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 16 Nov 2020 20:30:13 GMT Subject: RFR: 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows Message-ID: The Windows L&F uses the windows specific class XPStyle as part of the border in the JSpinner. This class cannot be serialized and causes an exception during serialization. The root cause is that BasicSpinnerUI forgot to reset the border in uninstallUI() by the LookAndFeel.uninstallBorder(). I have found one more place where the LookAndFeel.installBorder() is not followed by the LookAndFeel.uninstallBorder() in the AquaSpinnerUI. ------------- Commit messages: - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1234/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1234&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256376 Stats: 112 lines in 3 files changed: 88 ins; 4 del; 20 mod Patch: https://git.openjdk.java.net/jdk/pull/1234.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1234/head:pull/1234 PR: https://git.openjdk.java.net/jdk/pull/1234 From aivanov at openjdk.java.net Mon Nov 16 23:09:04 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 16 Nov 2020 23:09:04 GMT Subject: RFR: 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows In-Reply-To: References: Message-ID: On Mon, 16 Nov 2020 20:01:49 GMT, Sergey Bylokhov wrote: > The Windows L&F uses the windows specific class XPStyle as part of the border in the JSpinner. This class cannot be serialized and causes an exception during serialization. The root cause is that BasicSpinnerUI forgot to reset the border in uninstallUI() by the LookAndFeel.uninstallBorder(). I have found one more place where the LookAndFeel.installBorder() is not followed by the LookAndFeel.uninstallBorder() in the AquaSpinnerUI. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1234 From serb at openjdk.java.net Mon Nov 16 23:18:03 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 16 Nov 2020 23:18:03 GMT Subject: Integrated: 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows In-Reply-To: References: Message-ID: <5yLONZ4TmPD5paOlJA6R7tWNzRTHhQATxSsfbmcYI5g=.a5974d29-1b0d-4ed6-b5a0-592c0667a759@github.com> On Mon, 16 Nov 2020 20:01:49 GMT, Sergey Bylokhov wrote: > The Windows L&F uses the windows specific class XPStyle as part of the border in the JSpinner. This class cannot be serialized and causes an exception during serialization. The root cause is that BasicSpinnerUI forgot to reset the border in uninstallUI() by the LookAndFeel.uninstallBorder(). I have found one more place where the LookAndFeel.installBorder() is not followed by the LookAndFeel.uninstallBorder() in the AquaSpinnerUI. This pull request has now been integrated. Changeset: 36dbe6f2 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/36dbe6f2 Stats: 112 lines in 3 files changed: 88 ins; 4 del; 20 mod 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/1234 From psadhukhan at openjdk.java.net Tue Nov 17 02:57:00 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 17 Nov 2020 02:57:00 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <70CYeH1MC21ZFp74mRyEb7mdb6EPSzzR1SsTDsqHUmI=.ccf1128a-032e-4480-91fc-96b85dda2b43@github.com> Message-ID: <5I_NTHoIDJ6ETqKyajgTPX5OLa-UZV1lQ1yb8qWd2H8=.0ba474a1-8aad-41d9-8fda-30bca1bb2deb@github.com> On Fri, 13 Nov 2020 23:17:30 GMT, Sergey Bylokhov wrote: > SystemColors/LWCToolkit#loadNativeColors are for sure works on macOS it is responsible for the text selection color for example. I could not find how loadNativeColors() is used/works because only place I see it is called in macos is in loadSystemColors() which is commented out in AquaLookAndFeel. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Tue Nov 17 10:00:20 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 17 Nov 2020 10:00:20 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v2] In-Reply-To: References: Message-ID: > On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, > Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Use apple UI Element color ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1182/files - new: https://git.openjdk.java.net/jdk/pull/1182/files/c1cd3df5..f06c1d70 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=00-01 Stats: 11 lines in 4 files changed: 7 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1182/head:pull/1182 PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Tue Nov 17 20:30:03 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 17 Nov 2020 20:30:03 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v2] In-Reply-To: References: Message-ID: On Tue, 17 Nov 2020 10:00:20 GMT, Prasanta Sadhukhan wrote: >> On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, >> Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use apple UI Element color src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java line 216: > 214: 0xFFC0C0C0, // secondarySelectedControlColor > 215: 0xFF303030, // controlDarkShadowColor > 216: 0xFFFFFFFF, // controlTextColor As far as I understand the fix, It is a "alternateSelectedControlTextColor" not an "controlTextColor" ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Wed Nov 18 05:54:06 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 18 Nov 2020 05:54:06 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v2] In-Reply-To: References: Message-ID: <3FS6K7bsV6j0Q9OTslUtCCJhwZvtEhlzz-PNck0PMC8=.37cd05ad-7ba7-43ec-8820-cbd5371b9441@github.com> On Tue, 17 Nov 2020 20:27:11 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Use apple UI Element color > > src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java line 216: > >> 214: 0xFFC0C0C0, // secondarySelectedControlColor >> 215: 0xFF303030, // controlDarkShadowColor >> 216: 0xFFFFFFFF, // controlTextColor > > As far as I understand the fix, It is a "alternateSelectedControlTextColor" not an "controlTextColor" BTW isn't it is the same color as java_awt_SystemColor_CONTROL_LT_HIGHLIGHT? ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Wed Nov 18 07:33:15 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 18 Nov 2020 07:33:15 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v3] In-Reply-To: References: Message-ID: > On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, > Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Use proper apple UI Element color ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1182/files - new: https://git.openjdk.java.net/jdk/pull/1182/files/f06c1d70..ae1ba951 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=01-02 Stats: 4 lines in 3 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/1182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1182/head:pull/1182 PR: https://git.openjdk.java.net/jdk/pull/1182 From philip.race at oracle.com Thu Nov 19 00:00:11 2020 From: philip.race at oracle.com (Philip Race) Date: Wed, 18 Nov 2020 16:00:11 -0800 Subject: EA7 build of Project Lanai (Java 2D Metal rendering pipeline for macOS) is now posted Message-ID: <5FB5B58B.4060000@oracle.com> The EA 7 build of Project Lanai [1] was posted today at https://jdk.java.net/lanai/ EA 7 Build 16-lanai+3-278 (2020/11/17) Please do give it a try (-Dsun.java2d.metal=true) and let us know of issues. EA 7 contains the following new bug fixes relative to EA 6 # 8256331: Lanai: DrawImage/IncorrectAlphaSurface2SW fails # 8252954: Lanai : java/awt/datatransfer/DataFlavor/DataFlavorRemoteTest.java fails # 8252951: Lanai : java/awt/Robot/NonEmptyErrorStream.java fails # 8251033: Background texture is not visible when Alpha Composite is enabled # 8238533: [Lanai] Support texture paint where source is transparent # 8248129: Swingmark numbers are not good for Nimbus LAF # 8255212: J2DDemo : Rectangle in Texture paint disappears if we enable AA # 8255149: Lanai: DrawImage/IncorrectAlphaConversionBicubic.java failure # 8244718: J2DDemo - AlphaComposite tab - output colors are different with AA & non-AA # 8254881: Commit commandbuffer after draw happens through JNI # 8254879: Implement JNI path for Draw Poly # 8254869: Refactor check_previous_op usage in Mask Fill # 8244845: Lanai : J2DDemo - Clipping - Two parallel lines do not appear with AA Rendering # 8242924: Selection is not correct in Paint.TextureAnim # 8253994: J2DDemo: Buttcap, SquareCap color is different in AlphaComposite mode # 8252726: Lanai: IDEA Editor Rendering OGL vs Metal 1:2 # 8254176: Lanai: MTLTexturePool optimize lookup of expired textures -phil. [1] https://wiki.openjdk.java.net/display/lanai/Main -------------- next part -------------- An HTML attachment was scrubbed... URL: From serb at openjdk.java.net Thu Nov 19 00:12:08 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 19 Nov 2020 00:12:08 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v3] In-Reply-To: References: Message-ID: On Wed, 18 Nov 2020 07:33:15 GMT, Prasanta Sadhukhan wrote: >> On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, >> Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use proper apple UI Element color src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java line 500: > 498: } > 499: > 500: public static Color getControlTextColorUIResource() { Should be "getSelectedControlColorUIResource"? ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Thu Nov 19 03:37:16 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 19 Nov 2020 03:37:16 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v4] In-Reply-To: References: Message-ID: > On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, > Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: name correction ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1182/files - new: https://git.openjdk.java.net/jdk/pull/1182/files/ae1ba951..0721a7af Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1182&range=02-03 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1182/head:pull/1182 PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Thu Nov 19 08:32:04 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 19 Nov 2020 08:32:04 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: Message-ID: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> On Thu, 12 Nov 2020 09:58:36 GMT, Prasanta Sadhukhan wrote: > On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, > Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. I have tried to test this change on macOS 10.15 and found some differences from the old behavior. Before the fix: - The color was white for the selected tab while the window was focused, the same as in the native app(I have tested the tabs in the System preferences->Displays). So it worked fine. - The color was white for the selected tab while the window was unfocused(some other app is in focus). This is different from the native app, which uses black color. So this is a bug. After the fix: - The color is "blurred white" or even "light blue" for the selected tab while the window is focused. - The color is "light blue" for the selected tab while the window is unfocused. I think the new color used in the fix can be configured in the System Preferences -> General -> Highlight Color. If I select the green color then the tabs start to use green as a font color, which looks incorrect. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Thu Nov 19 10:55:06 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 19 Nov 2020 10:55:06 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> Message-ID: <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> On Thu, 19 Nov 2020 08:29:11 GMT, Sergey Bylokhov wrote: >> On macOS 11 (bigsur) beta, using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, >> Proposed fix is to use dark color in light background so I used lightGray instead of "white" which is being used now, if we are on BigSur. > > I have tried to test this change on macOS 10.15 and found some differences from the old behavior. > Before the fix: > - The color was white for the selected tab while the window was focused, the same as in the native app(I have tested the tabs in the System preferences->Displays). So it worked fine. > - The color was white for the selected tab while the window was unfocused(some other app is in focus). This is different from the native app, which uses black color. So this is a bug. > > After the fix: > - The color is "blurred white" or even "light blue" for the selected tab while the window is focused. > - The color is "light blue" for the selected tab while the window is unfocused. > > I think the new color used in the fix can be configured in the System Preferences -> General -> Highlight Color. If I select the green color then the tabs start to use green as a font color, which looks incorrect. In Mohave, native System Preferences->Display tabs has white-text-on-blue-background when windows is focused black-text-on-lightgray-background when window is unfocused In macos11, it is always black-text-on-white-background whether focused/unfocused. Current JDK tabpane always shows black background (when tab is selected) which is not configurable, at least I could not change it. Only thing i could change is the foreground text color. As was told to get color from native, I could see only "selectedTextBackground" and "selectedControlColor" works on both pre-macos11 and macos11 as it gives bluish text color which is legible on black (mohave) and white (macos11) background. All other native-obtained-colors like selectedTextColor, selectedControlTextColor, controlTextColor, textBackgroundColor either gives black or white which is not legible on either pre-macos11 or macos11, so was not used. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From shade at openjdk.java.net Thu Nov 19 14:37:08 2020 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 19 Nov 2020 14:37:08 GMT Subject: RFR: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: Message-ID: On Wed, 11 Nov 2020 06:12:28 GMT, Sergey Bylokhov wrote: > The typo in the MetalRootLayout is fixed. The tpWidth was replaced by the tpHeight for height calculation. Seems like a simple bug. Looks good! ------------- Marked as reviewed by shade (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1155 From serb at openjdk.java.net Thu Nov 19 18:59:06 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 19 Nov 2020 18:59:06 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Thu, 19 Nov 2020 10:51:55 GMT, Prasanta Sadhukhan wrote: >> I have tried to test this change on macOS 10.15 and found some differences from the old behavior. >> Before the fix: >> - The color was white for the selected tab while the window was focused, the same as in the native app(I have tested the tabs in the System preferences->Displays). So it worked fine. >> - The color was white for the selected tab while the window was unfocused(some other app is in focus). This is different from the native app, which uses black color. So this is a bug. >> >> After the fix: >> - The color is "blurred white" or even "light blue" for the selected tab while the window is focused. >> - The color is "light blue" for the selected tab while the window is unfocused. >> >> I think the new color used in the fix can be configured in the System Preferences -> General -> Highlight Color. If I select the green color then the tabs start to use green as a font color, which looks incorrect. > > In Mohave, native System Preferences->Display tabs has > white-text-on-blue-background when windows is focused > black-text-on-lightgray-background when window is unfocused > > In macos11, it is always black-text-on-white-background whether focused/unfocused. > > Current JDK tabpane always shows black background (when tab is selected) which is not configurable, at least I could not change it. Only thing i could change is the foreground text color. > As was told to get color from native, I could see only "selectedTextBackground" and "selectedControlColor" works on both pre-macos11 and macos11 as it gives bluish text color which is legible on black (mohave) and white (macos11) background. > > All other native-obtained-colors like selectedTextColor, selectedControlTextColor, controlTextColor, textBackgroundColor either gives black or white which is not legible on either pre-macos11 or macos11, so was not used. Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Thu Nov 19 19:19:05 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 19 Nov 2020 19:19:05 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors In-Reply-To: References: Message-ID: On Wed, 11 Nov 2020 08:00:09 GMT, Prasanta Sadhukhan wrote: > Issue is a JLabel with a translucent foreground color properly renders plain text, but with HTML text, the alpha component is discarded and the text is rendered using an opaque color. > As per https://www.w3schools.com/cssref/func_rgba.asp, CSS supports rgba() to support alpha and render translucent text color > but support for rgba() is not present in JDK html text rendering. > > Added support for rgba() to render translucent text color. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1403: > 1401: color = parseRGB(str); > 1402: } else if (str.startsWith("rgba(")) { > 1403: color = parseRGBA(str); Probably we need to update the spec for StyleSheet.stringToColor() src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 64: > 62: public static View createHTMLView(JComponent c, String html) { > 63: BasicEditorKit kit = getFactory(); > 64: int beginIndex = html.indexOf("rgba("); Don't we need to implement this parsing similarly to rgb()? somewhere inside kit.createDefaultDocument() or where we parse rgb()? ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From serb at openjdk.java.net Thu Nov 19 22:44:08 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 19 Nov 2020 22:44:08 GMT Subject: Integrated: 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize In-Reply-To: References: Message-ID: On Wed, 11 Nov 2020 06:12:28 GMT, Sergey Bylokhov wrote: > The typo in the MetalRootLayout is fixed. The tpWidth was replaced by the tpHeight for height calculation. This pull request has now been integrated. Changeset: c816464c Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/c816464c Stats: 126 lines in 2 files changed: 117 ins; 0 del; 9 mod 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize Reviewed-by: shade ------------- PR: https://git.openjdk.java.net/jdk/pull/1155 From javalists at cbfiddle.com Fri Nov 20 00:05:29 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Thu, 19 Nov 2020 16:05:29 -0800 Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: VAqua uses controlTextColor which has the value 255 255 255 217. If you are seeing opaque white, then the alpha channel is getting lost somewhere. Alan > On Nov 19, 2020, at 10:59 AM, Sergey Bylokhov wrote: > > On Thu, 19 Nov 2020 10:51:55 GMT, Prasanta Sadhukhan > wrote: > >>> I have tried to test this change on macOS 10.15 and found some differences from the old behavior. >>> Before the fix: >>> - The color was white for the selected tab while the window was focused, the same as in the native app(I have tested the tabs in the System preferences->Displays). So it worked fine. >>> - The color was white for the selected tab while the window was unfocused(some other app is in focus). This is different from the native app, which uses black color. So this is a bug. >>> >>> After the fix: >>> - The color is "blurred white" or even "light blue" for the selected tab while the window is focused. >>> - The color is "light blue" for the selected tab while the window is unfocused. >>> >>> I think the new color used in the fix can be configured in the System Preferences -> General -> Highlight Color. If I select the green color then the tabs start to use green as a font color, which looks incorrect. >> >> In Mohave, native System Preferences->Display tabs has >> white-text-on-blue-background when windows is focused >> black-text-on-lightgray-background when window is unfocused >> >> In macos11, it is always black-text-on-white-background whether focused/unfocused. >> >> Current JDK tabpane always shows black background (when tab is selected) which is not configurable, at least I could not change it. Only thing i could change is the foreground text color. >> As was told to get color from native, I could see only "selectedTextBackground" and "selectedControlColor" works on both pre-macos11 and macos11 as it gives bluish text color which is legible on black (mohave) and white (macos11) background. >> >> All other native-obtained-colors like selectedTextColor, selectedControlTextColor, controlTextColor, textBackgroundColor either gives black or white which is not legible on either pre-macos11 or macos11, so was not used. > > Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum. > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/1182 -------------- next part -------------- An HTML attachment was scrubbed... URL: From javalists at cbfiddle.com Fri Nov 20 00:16:20 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Thu, 19 Nov 2020 16:16:20 -0800 Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: <07034857-95C5-4D21-B74E-09802C665ED1@cbfiddle.com> When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color. It would be wrong to assume that Apple only uses named colors in their UIs. The named colors are for application developers, not for Apple itself. Alan > On Nov 19, 2020, at 4:05 PM, Alan Snyder wrote: > > VAqua uses controlTextColor which has the value 255 255 255 217. > > If you are seeing opaque white, then the alpha channel is getting lost somewhere. > > Alan > > >> On Nov 19, 2020, at 10:59 AM, Sergey Bylokhov > wrote: >> >> On Thu, 19 Nov 2020 10:51:55 GMT, Prasanta Sadhukhan > wrote: >> >>>> I have tried to test this change on macOS 10.15 and found some differences from the old behavior. >>>> Before the fix: >>>> - The color was white for the selected tab while the window was focused, the same as in the native app(I have tested the tabs in the System preferences->Displays). So it worked fine. >>>> - The color was white for the selected tab while the window was unfocused(some other app is in focus). This is different from the native app, which uses black color. So this is a bug. >>>> >>>> After the fix: >>>> - The color is "blurred white" or even "light blue" for the selected tab while the window is focused. >>>> - The color is "light blue" for the selected tab while the window is unfocused. >>>> >>>> I think the new color used in the fix can be configured in the System Preferences -> General -> Highlight Color. If I select the green color then the tabs start to use green as a font color, which looks incorrect. >>> >>> In Mohave, native System Preferences->Display tabs has >>> white-text-on-blue-background when windows is focused >>> black-text-on-lightgray-background when window is unfocused >>> >>> In macos11, it is always black-text-on-white-background whether focused/unfocused. >>> >>> Current JDK tabpane always shows black background (when tab is selected) which is not configurable, at least I could not change it. Only thing i could change is the foreground text color. >>> As was told to get color from native, I could see only "selectedTextBackground" and "selectedControlColor" works on both pre-macos11 and macos11 as it gives bluish text color which is legible on black (mohave) and white (macos11) background. >>> >>> All other native-obtained-colors like selectedTextColor, selectedControlTextColor, controlTextColor, textBackgroundColor either gives black or white which is not legible on either pre-macos11 or macos11, so was not used. >> >> Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum. >> >> ------------- >> >> PR: https://git.openjdk.java.net/jdk/pull/1182 -------------- next part -------------- An HTML attachment was scrubbed... URL: From psadhukhan at openjdk.java.net Fri Nov 20 03:41:21 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 20 Nov 2020 03:41:21 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: References: Message-ID: > Issue is a JLabel with a translucent foreground color properly renders plain text, but with HTML text, the alpha component is discarded and the text is rendered using an opaque color. > As per https://www.w3schools.com/cssref/func_rgba.asp, CSS supports rgba() to support alpha and render translucent text color > but support for rgba() is not present in JDK html text rendering. > > Added support for rgba() to render translucent text color. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Update spec ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1158/files - new: https://git.openjdk.java.net/jdk/pull/1158/files/769eb298..bf0c84ae Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1158&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1158&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1158.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1158/head:pull/1158 PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Fri Nov 20 03:45:04 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 20 Nov 2020 03:45:04 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: References: Message-ID: On Thu, 19 Nov 2020 19:16:31 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Update spec > > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 64: > >> 62: public static View createHTMLView(JComponent c, String html) { >> 63: BasicEditorKit kit = getFactory(); >> 64: int beginIndex = html.indexOf("rgba("); > > Don't we need to implement this parsing similarly to rgb()? somewhere inside kit.createDefaultDocument() or where we parse rgb()? The problem is the alpha color not being present in c.getForeground() so we need to parse alpha here to pass the value to displayPropertiesToCSS(). I have already mentioned it below. ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Fri Nov 20 03:45:06 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 20 Nov 2020 03:45:06 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: <2L1bXyzzioM0GGzPVTqfPGqi1G4NPlmgl9GtLz_rr58=.dace28e9-a6f0-4e9f-835b-9de7fc9f6902@github.com> References: <2L1bXyzzioM0GGzPVTqfPGqi1G4NPlmgl9GtLz_rr58=.dace28e9-a6f0-4e9f-835b-9de7fc9f6902@github.com> Message-ID: <5wfWwCD-9PxMH5yYE23IJwI_wrb1dlyaEY_Hy6HWOFE=.0396d9e4-01ba-4c9a-aa77-6e192a679c91@github.com> On Wed, 11 Nov 2020 08:03:08 GMT, Prasanta Sadhukhan wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Update spec > > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 76: > >> 74: } >> 75: col = new Color(Integer.parseInt(color[0]), Integer.parseInt(color[1]), >> 76: Integer.parseInt(color[2]), (int)(Float.parseFloat(color[3])*255)); > > It seems OceanTheme in Metal L&F supports only rgb > > `ColorUIResource CONTROL_TEXT_COLOR = new PrintColorUIResource(0x333333, Color.BLACK)` > > so even when Color(r,g,b,a) is used, it creates rgb color and not rgba > so alpha is obtained and passed separately. I have already mentioned it here. ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From javalists at cbfiddle.com Fri Nov 20 14:56:52 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Fri, 20 Nov 2020 06:56:52 -0800 Subject: taskbar icon badge issue In-Reply-To: <29bc2d5c-5782-7dbd-5909-364d9629fca1@oracle.com> References: <18ffee46-69a5-752a-29d0-089573f82c22@oracle.com> <29bc2d5c-5782-7dbd-5909-364d9629fca1@oracle.com> Message-ID: I don?t believe there is any bug here. Setting a badge on the app icon requires a permission that is controlled using the Notifications system preference. Using JDK 12, I can allow or prevent the test program from setting a badge by enabling or disabling notifications from ?java?. See linked image [1]. I hope the ?fix? can be reverted in JDK 16. Alan [1] https://cr.openjdk.java.net/~alans/8230869/Notifications.png > On Oct 26, 2020, at 2:29 PM, Sergey Bylokhov wrote: > > On 26.10.2020 14:16, Alan Snyder wrote: >>> I have tested the "DockBadge.java" from the https://bugs.openjdk.java.net/browse/JDK-8230869 on macOS 10.15.7 + JDK12 and it does not work =( >> That seems odd. Are you saying that no dock icons ever show a badge on 10.15.7? > > yes, in some updates it works, in another, it does not. > >> On my 10.15.6, I see dock badges on System Preferences, App Store, and Feedback Assistant. How are they accomplishing this? Do Apple apps use a private API> I?m suspicious that the problem is in the JDK, in which case it should be fixable. > > The Apple standard/public API for dock badges stop working when using with JRS. > > -- > Best regards, Sergey. > From serb at openjdk.java.net Sun Nov 22 09:20:36 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 22 Nov 2020 09:20:36 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 Message-ID: The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: https://bugs.openjdk.java.net/browse/JDK-8011764 This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. ------------- Commit messages: - Update PaintThumbSize.java - Create PaintThumbSize.java - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1373/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1373&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256713 Stats: 192 lines in 3 files changed: 177 ins; 2 del; 13 mod Patch: https://git.openjdk.java.net/jdk/pull/1373.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1373/head:pull/1373 PR: https://git.openjdk.java.net/jdk/pull/1373 From jdv at openjdk.java.net Mon Nov 23 05:37:55 2020 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 23 Nov 2020 05:37:55 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Sun, 22 Nov 2020 08:59:48 GMT, Sergey Bylokhov wrote: > The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: > https://bugs.openjdk.java.net/browse/JDK-8011764 > > This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). > > The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. > > As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D > > To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From serb at openjdk.java.net Mon Nov 23 05:55:56 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 23 Nov 2020 05:55:56 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: <5wfWwCD-9PxMH5yYE23IJwI_wrb1dlyaEY_Hy6HWOFE=.0396d9e4-01ba-4c9a-aa77-6e192a679c91@github.com> References: <2L1bXyzzioM0GGzPVTqfPGqi1G4NPlmgl9GtLz_rr58=.dace28e9-a6f0-4e9f-835b-9de7fc9f6902@github.com> <5wfWwCD-9PxMH5yYE23IJwI_wrb1dlyaEY_Hy6HWOFE=.0396d9e4-01ba-4c9a-aa77-6e192a679c91@github.com> Message-ID: On Fri, 20 Nov 2020 03:42:01 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 76: >> >>> 74: } >>> 75: col = new Color(Integer.parseInt(color[0]), Integer.parseInt(color[1]), >>> 76: Integer.parseInt(color[2]), (int)(Float.parseFloat(color[3])*255)); >> >> It seems OceanTheme in Metal L&F supports only rgb >> >> `ColorUIResource CONTROL_TEXT_COLOR = new PrintColorUIResource(0x333333, Color.BLACK)` >> >> so even when Color(r,g,b,a) is used, it creates rgb color and not rgba >> so alpha is obtained and passed separately. > > I have already mentioned it here. But in what place we parse "rgb(...)"? it does not seem mentioned in this method and does not depend on the c.getForeground()? ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Mon Nov 23 07:39:58 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 23 Nov 2020 07:39:58 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: References: <2L1bXyzzioM0GGzPVTqfPGqi1G4NPlmgl9GtLz_rr58=.dace28e9-a6f0-4e9f-835b-9de7fc9f6902@github.com> <5wfWwCD-9PxMH5yYE23IJwI_wrb1dlyaEY_Hy6HWOFE=.0396d9e4-01ba-4c9a-aa77-6e192a679c91@github.com> Message-ID: On Mon, 23 Nov 2020 05:52:59 GMT, Sergey Bylokhov wrote: >> I have already mentioned it here. > > But in what place we parse "rgb(...)"? it does not seem mentioned in this method and does not depend on the c.getForeground()? It is parsed in Parser.java#parseAttributeValue() which is being called from this method via kit.read(). It also parses rgba() and store it but JDK does not seem to support rgba() in CSS.java and also SwingUtilities2.displayPropertiesToCSS() which is being called prior to html parsing so alpha needs to be parsed separately. ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Mon Nov 23 09:21:00 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 23 Nov 2020 09:21:00 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Sun, 22 Nov 2020 08:59:48 GMT, Sergey Bylokhov wrote: > The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: > https://bugs.openjdk.java.net/browse/JDK-8011764 > > This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). > > The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. > > As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D > > To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java line 1618: > 1616: } > 1617: } > 1618: g.setClip(clip); Since it is normally seen in Metal L&F, shouldn't we do the clip setting in MetalSliderUI.paintThumb() instead? If we are doing it in BasicSliderUI, can you please explain why are we not seeing it in other L&Fs like nimbus or motif? ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From serb at openjdk.java.net Tue Nov 24 00:11:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 24 Nov 2020 00:11:59 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Mon, 23 Nov 2020 09:18:35 GMT, Prasanta Sadhukhan wrote: >> The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: >> https://bugs.openjdk.java.net/browse/JDK-8011764 >> >> This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). >> >> The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. >> >> As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D >> >> To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. > > src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java line 1618: > >> 1616: } >> 1617: } >> 1618: g.setClip(clip); > > Since it is normally seen in Metal L&F, shouldn't we do the clip setting in MetalSliderUI.paintThumb() instead? > If we are doing it in BasicSliderUI, can you please explain why are we not seeing it in other L&Fs like nimbus or motif? The bug in the motif was fixed by the JDK-8032219, the code in the BasicSliderUI is never used by the Metal L&F, I tested that code by the commented out the overridden code in the MetalSliderUI. ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From serb at openjdk.java.net Tue Nov 24 05:00:55 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 24 Nov 2020 05:00:55 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v2] In-Reply-To: References: Message-ID: On Fri, 20 Nov 2020 03:41:54 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 64: >> >>> 62: public static View createHTMLView(JComponent c, String html) { >>> 63: BasicEditorKit kit = getFactory(); >>> 64: int beginIndex = html.indexOf("rgba("); >> >> Don't we need to implement this parsing similarly to rgb()? somewhere inside kit.createDefaultDocument() or where we parse rgb()? > > The problem is the alpha color not being present in c.getForeground() so we need to parse alpha here to pass the value to displayPropertiesToCSS(). I have already mentioned it below. As far as I understand the only place where we decode `rgb()` is `CSS.stringToColor` and that code missing the `rgba()` case. Just to double-check. If the test case `TestTranslucentLabelText` will be modified to use `rgb()` instead of `rgba()` then the color which was set by the user to the `Component` will be ignored, and the correct color from the `rgb()` will be used. So it does not matter that `c.getForeground()` contains some opaque color, it is ignored, why the similar case for` rgba()` does not work in the same way? ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Tue Nov 24 08:50:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 24 Nov 2020 08:50:57 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Thu, 19 Nov 2020 18:56:43 GMT, Sergey Bylokhov wrote: >> In Mohave, native System Preferences->Display tabs has >> white-text-on-blue-background when windows is focused >> black-text-on-lightgray-background when window is unfocused >> >> In macos11, it is always black-text-on-white-background whether focused/unfocused. >> >> Current JDK tabpane always shows black background (when tab is selected) which is not configurable, at least I could not change it. Only thing i could change is the foreground text color. >> As was told to get color from native, I could see only "selectedTextBackground" and "selectedControlColor" works on both pre-macos11 and macos11 as it gives bluish text color which is legible on black (mohave) and white (macos11) background. >> >> All other native-obtained-colors like selectedTextColor, selectedControlTextColor, controlTextColor, textBackgroundColor either gives black or white which is not legible on either pre-macos11 or macos11, so was not used. > > Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum. Tried to find and change tabpane background color for "selected" tab but unable to do so. Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background color to no avail. Tried to set background by calling tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets background for non-selected tab (keeping black background for selected tab in mohave unchanged). I see it's been like that at least from jdk8GA. Post to apple forum is unanswered. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Tue Nov 24 11:04:00 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 24 Nov 2020 11:04:00 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 00:09:03 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java line 1618: >> >>> 1616: } >>> 1617: } >>> 1618: g.setClip(clip); >> >> Since it is normally seen in Metal L&F, shouldn't we do the clip setting in MetalSliderUI.paintThumb() instead? >> If we are doing it in BasicSliderUI, can you please explain why are we not seeing it in other L&Fs like nimbus or motif? > > The bug in the motif was fixed by the JDK-8032219, the code in the BasicSliderUI is never used by the Metal L&F, I tested that code by the commented out the overridden code in the MetalSliderUI. If the code in BasicSliderUI is not used by Metal L&F, then, all the more reason to have the clip setting in MetalSliderUI.paintThumb(), no? What about nimbus? Why it is not seen in nimbus l&f? I guess only reason I can think of putting the code in BasicL&F is if it's a generic issue and it will solve multiple L&F but it seems the issue only affects MetalL&F. ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From psadhukhan at openjdk.java.net Tue Nov 24 13:02:12 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 24 Nov 2020 13:02:12 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v3] In-Reply-To: References: Message-ID: > Issue is a JLabel with a translucent foreground color properly renders plain text, but with HTML text, the alpha component is discarded and the text is rendered using an opaque color. > As per https://www.w3schools.com/cssref/func_rgba.asp, CSS supports rgba() to support alpha and render translucent text color > but support for rgba() is not present in JDK html text rendering. > > Added support for rgba() to render translucent text color. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Revert unneeded additional code ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1158/files - new: https://git.openjdk.java.net/jdk/pull/1158/files/bf0c84ae..f98cae53 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1158&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1158&range=01-02 Stats: 64 lines in 3 files changed: 10 ins; 42 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/1158.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1158/head:pull/1158 PR: https://git.openjdk.java.net/jdk/pull/1158 From psadhukhan at openjdk.java.net Tue Nov 24 13:02:12 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 24 Nov 2020 13:02:12 GMT Subject: RFR: 8256019: JLabel HTML text does not support translucent text colors [v3] In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 04:58:37 GMT, Sergey Bylokhov wrote: >> The problem is the alpha color not being present in c.getForeground() so we need to parse alpha here to pass the value to displayPropertiesToCSS(). I have already mentioned it below. > > As far as I understand the only place where we decode `rgb()` is `CSS.stringToColor` and that code missing the `rgba()` case. > Just to double-check. > If the test case `TestTranslucentLabelText` will be modified to use `rgb()` instead of `rgba()` then the color which was set by the user to the `Component` will be ignored, and the correct color from the `rgb()` will be used. So it does not matter that `c.getForeground()` contains some opaque color, it is ignored, why the similar case for` rgba()` does not work in the same way? Yes, seems like overkill last time which is not needed. Reverted back unneeded code. ------------- PR: https://git.openjdk.java.net/jdk/pull/1158 From serb at openjdk.java.net Tue Nov 24 20:23:56 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 24 Nov 2020 20:23:56 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 11:00:42 GMT, Prasanta Sadhukhan wrote: >> The bug in the motif was fixed by the JDK-8032219, the code in the BasicSliderUI is never used by the Metal L&F, I tested that code by the commented out the overridden code in the MetalSliderUI. > > If the code in BasicSliderUI is not used by Metal L&F, then, all the more reason to have the clip setting in MetalSliderUI.paintThumb(), no? > What about nimbus? Why it is not seen in nimbus l&f? > I guess only reason I can think of putting the code in BasicL&F is if it's a generic issue and it will solve multiple L&F but it seems the issue only affects MetalL&F. I have set the clip in the methods which do not draw the thumb properly - draw it outside the bounds of the thumb(it is a limitationGraphics). Only three places were affected, the motif - fixed in JDK-8032219, the old default metal L&F(steel) fixed in this fix in the MetalIconFactory.java. And the code in the BasicSliderUI is not executed by the metal but could be triggered by commenting on some code. ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From Sergey.Bylokhov at oracle.com Tue Nov 24 21:32:09 2020 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Tue, 24 Nov 2020 13:32:09 -0800 Subject: taskbar icon badge issue In-Reply-To: References: <18ffee46-69a5-752a-29d0-089573f82c22@oracle.com> <29bc2d5c-5782-7dbd-5909-364d9629fca1@oracle.com> Message-ID: <6a5a165b-8c0d-063e-9b57-ba8906ec7608@oracle.com> On 20.11.2020 06:56, Alan Snyder wrote: > I don?t believe there is any bug here. It was there, and it was reported to Apple ID-7261735. Looks like this bug has a few fixes and the last update was that it could work in 10.15.5 beta 3. I'll take a look. > Setting a badge on the app icon requires a permission that is controlled using the Notifications system preference. > Using JDK 12, I can allow or prevent the test program from setting a badge by enabling or disabling notifications from ?java?. > See linked image [1]. > > I hope the ?fix? can be reverted in JDK 16. > > Alan > > [1] https://cr.openjdk.java.net/~alans/8230869/Notifications.png > > > >> On Oct 26, 2020, at 2:29 PM, Sergey Bylokhov wrote: >> >> On 26.10.2020 14:16, Alan Snyder wrote: >>>> I have tested the "DockBadge.java" from the https://bugs.openjdk.java.net/browse/JDK-8230869 on macOS 10.15.7 + JDK12 and it does not work =( >>> That seems odd. Are you saying that no dock icons ever show a badge on 10.15.7? >> >> yes, in some updates it works, in another, it does not. >> >>> On my 10.15.6, I see dock badges on System Preferences, App Store, and Feedback Assistant. How are they accomplishing this? Do Apple apps use a private API> I?m suspicious that the problem is in the JDK, in which case it should be fixable. >> >> The Apple standard/public API for dock badges stop working when using with JRS. >> >> -- >> Best regards, Sergey. >> > -- Best regards, Sergey. From darcy at openjdk.java.net Tue Nov 24 21:58:03 2020 From: darcy at openjdk.java.net (Joe Darcy) Date: Tue, 24 Nov 2020 21:58:03 GMT Subject: RFR: 8253753 Enable default constructor warning in client modules Message-ID: With the default constructors warnings in java.desktop and jdk.accessibility now fixed, the warning should be enabled in the build for those modules. ------------- Commit messages: - Merge branch 'JDK-8253753' of https://github.com/jddarcy/jdk into JDK-8253753 - Update build to enable default constructor warning in client modules. - Update build to enable default constructor warning in client modules. Changes: https://git.openjdk.java.net/jdk/pull/1420/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1420&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8253753 Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/1420.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1420/head:pull/1420 PR: https://git.openjdk.java.net/jdk/pull/1420 From serb at openjdk.java.net Tue Nov 24 21:26:03 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 24 Nov 2020 21:26:03 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Tue, 24 Nov 2020 08:48:36 GMT, Prasanta Sadhukhan wrote: >> Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum. > > Tried to find and change tabpane background color for "selected" tab but unable to do so. > Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background color to no avail. Tried to set background by calling tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets background for non-selected tab (keeping black background for selected tab in mohave unchanged). I see it's been like that at least from jdk8GA. > Post to apple forum is unanswered. > When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color. > It would be wrong to assume that Apple only uses named colors in their UIs. > The named colors are for application developers, not for Apple itself. The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From prr at openjdk.java.net Tue Nov 24 22:05:56 2020 From: prr at openjdk.java.net (Phil Race) Date: Tue, 24 Nov 2020 22:05:56 GMT Subject: RFR: 8253753 Enable default constructor warning in client modules In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 19:10:04 GMT, Joe Darcy wrote: > With the default constructors warnings in java.desktop and jdk.accessibility now fixed, the warning should be enabled in the build for those modules. I tried this myself a few weeks ago and it was fine. ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1420 From serb at openjdk.java.net Tue Nov 24 23:09:57 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 24 Nov 2020 23:09:57 GMT Subject: RFR: 8253753 Enable default constructor warning in client modules In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 19:10:04 GMT, Joe Darcy wrote: > With the default constructors warnings in java.desktop and jdk.accessibility now fixed, the warning should be enabled in the build for those modules. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1420 From serb at openjdk.java.net Wed Nov 25 00:52:09 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 25 Nov 2020 00:52:09 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails Message-ID: Here is a fix for one of the annoying bug, which causes random test failures in the CI. We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. Currently, it is implemented in this way: 1. Flush the EventQueue, so all old events will be posted to EDT. 2. Flush the native event queue, by posting the native event. 3. Flush the EDT, by posting a java event. 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). But it has the next disadvantages: - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). The fix: - Add a small delay to the method, so the app can do something useful when waitForIdle() is called - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. ------------- Commit messages: - Update SunToolkit.java - The new tests - Do not use shared state - Update SunToolkit.java - realSync too slow - Update bug5074573.java - Test update - Initial fix Changes: https://git.openjdk.java.net/jdk/pull/1424/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1424&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8196100 Stats: 242 lines in 9 files changed: 192 ins; 20 del; 30 mod Patch: https://git.openjdk.java.net/jdk/pull/1424.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1424/head:pull/1424 PR: https://git.openjdk.java.net/jdk/pull/1424 From psadhukhan at openjdk.java.net Wed Nov 25 02:57:56 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 25 Nov 2020 02:57:56 GMT Subject: RFR: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Sun, 22 Nov 2020 08:59:48 GMT, Sergey Bylokhov wrote: > The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: > https://bugs.openjdk.java.net/browse/JDK-8011764 > > This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). > > The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. > > As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D > > To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From psadhukhan at openjdk.java.net Wed Nov 25 03:21:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 25 Nov 2020 03:21:57 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Tue, 24 Nov 2020 21:23:38 GMT, Sergey Bylokhov wrote: >> Tried to find and change tabpane background color for "selected" tab but unable to do so. >> Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background color to no avail. Tried to set background by calling tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets background for non-selected tab (keeping black background for selected tab in mohave unchanged). I see it's been like that at least from jdk8GA. >> Post to apple forum is unanswered. > >> When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color. >> It would be wrong to assume that Apple only uses named colors in their UIs. >> The named colors are for application developers, not for Apple itself. > > The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it. Since color of tabpane is controlled by Apple, Can you point me to the code where we call Apple api to draw the color of tabpane? ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From javalists at cbfiddle.com Wed Nov 25 03:41:35 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Tue, 24 Nov 2020 19:41:35 -0800 Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Nov 24, 2020, at 7:21 PM, Prasanta Sadhukhan wrote: > > On Tue, 24 Nov 2020 21:23:38 GMT, Sergey Bylokhov > wrote: > >>> Tried to find and change tabpane background color for "selected" tab but unable to do so. >>> Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background color to no avail. Tried to set background by calling tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets background for non-selected tab (keeping black background for selected tab in mohave unchanged). I see it's been like that at least from jdk8GA. >>> Post to apple forum is unanswered. >> >>> When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color. >>> It would be wrong to assume that Apple only uses named colors in their UIs. >>> The named colors are for application developers, not for Apple itself. >> >> The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it. > > Since color of tabpane is controlled by Apple, Can you point me to the code where we call Apple api to draw the color of tabpane? > You don?t. All you do is ask for a Tab style button: protected final AquaPainter painter = AquaPainter.create(JRSUIStateFactory.getTab()); It's a nice abstract interface, but it lacks the corresponding API for getting the Tab text color to match a given appearance and state. Basically, the API is incomplete and has not been kept up to date. Otherwise, VAqua would not exist. :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From trebari at openjdk.java.net Wed Nov 25 06:40:12 2020 From: trebari at openjdk.java.net (Tejpal Rebari) Date: Wed, 25 Nov 2020 06:40:12 GMT Subject: RFR: 8048109: JToggleButton does not fire actionPerformed under certain conditions [v2] In-Reply-To: References: Message-ID: > Please review the following fix for jdk16. > > Issue : There is a JToggleButton that will post/take down a JPopupMenu when the button is selected. If the button is selected and the menu is not posted the action listener will post the menu. If the button is selected and the menu is displayed the action listener will take the menu down. The use case is: > 1 - select button > 2 - menu posted > 3 - select button > 4 - menu taken down > > With MetalLookAndFeel the above use case works fine, but with WindowsLookAndFeel the second button selection does not fire the actionPerformed event, button needs to be selected third time for the menu to be taken down. > > The issue is that the button must be selected twice after the menu is posted to have the actionPerformed event to fire when using the Windows look and feel. > > Fix : MouseGrabber is not removed while uninstalling the listeners in the BasicPopupMenuUI. > By removing the mouseGrabber in the uninstallListeners() methods fixes this issue. > > Added a test to test the same in all the LookAndFeels Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision: modified the test after suggestions ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/600/files - new: https://git.openjdk.java.net/jdk/pull/600/files/a60ffa67..65c08eda Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=600&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=600&range=00-01 Stats: 10 lines in 1 file changed: 7 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/600.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/600/head:pull/600 PR: https://git.openjdk.java.net/jdk/pull/600 From javalists at cbfiddle.com Wed Nov 25 17:30:34 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Wed, 25 Nov 2020 09:30:34 -0800 Subject: taskbar icon badge issue In-Reply-To: <6a5a165b-8c0d-063e-9b57-ba8906ec7608@oracle.com> References: <18ffee46-69a5-752a-29d0-089573f82c22@oracle.com> <29bc2d5c-5782-7dbd-5909-364d9629fca1@oracle.com> <6a5a165b-8c0d-063e-9b57-ba8906ec7608@oracle.com> Message-ID: > On Nov 24, 2020, at 1:32 PM, Sergey Bylokhov wrote: > > It was there, and it was reported to Apple ID-7261735. Looks like this bug has a few > fixes and the last update was that it could work in 10.15.5 beta 3. > I'll take a look. Thanks. By the way, it is not clear to me why it is a good idea to throw UnsupportedOperationException based on the possibility that the badge *might not* be displayed on some OS releases. The obvious downside is that the badge will then not be displayed even on releases where it would work. Does the application need to know that the badge was not displayed? I don?t see why, but it does, then are you prepared to throw an exception when the request was not permitted because the user did not grant permission? Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: From javalists at cbfiddle.com Wed Nov 25 17:36:24 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Wed, 25 Nov 2020 09:36:24 -0800 Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: <335E9105-88E8-4D70-BA5A-603B2F810FC1@cbfiddle.com> > On Nov 24, 2020, at 1:26 PM, Sergey Bylokhov wrote: > > The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it. I feel your pain. :-) The only alternative would be for Apple to provide the text color information to the JDK. Good luck with that. Even if they did, based on my experience, I predict that there would still be bugs with each new major release. They would be Apple bugs rather than JDK bugs, but that is a small consolation. Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: From kizune at openjdk.java.net Wed Nov 25 17:52:03 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 25 Nov 2020 17:52:03 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails In-Reply-To: References: Message-ID: <-3MWzl2XJ7KjbSdtS3LZpz4mqE2hG4MLa5iL8XnDQLE=.1951234f-6a8c-4414-849b-c0f53ac52c16@github.com> On Wed, 25 Nov 2020 00:15:11 GMT, Sergey Bylokhov wrote: > Here is a fix for one of the annoying bug, which causes random test failures in the CI. > > We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. > > Currently, it is implemented in this way: > 1. Flush the EventQueue, so all old events will be posted to EDT. > 2. Flush the native event queue, by posting the native event. > 3. Flush the EDT, by posting a java event. > 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. > > It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). > > But it has the next disadvantages: > - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. > - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. > - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). > > > The fix: > - Add a small delay to the method, so the app can do something useful when waitForIdle() is called > - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded > - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. > > Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: > EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); > It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. src/java.desktop/share/classes/sun/awt/SunToolkit.java line 1383: > 1381: it.next().modalityPopped(ev); > 1382: } > 1383: } I think that the rationale behind this exception as that in case of really stuck loop we could identify it. Why are we throwing it away? Now when we exceed the maximum allowed number of iterations we are assuming that the native event queue synchronization happened while it might not be the case. test/jdk/java/awt/Robot/InfiniteLoopException.java line 63: > 61: long time = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start); > 62: if (time > 20) { > 63: throw new RuntimeException("To slow:" + time); Typo? Shouldn't it be "Too slow"? ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From serb at openjdk.java.net Wed Nov 25 20:30:59 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 25 Nov 2020 20:30:59 GMT Subject: Integrated: 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 In-Reply-To: References: Message-ID: On Sun, 22 Nov 2020 08:59:48 GMT, Sergey Bylokhov wrote: > The problem became visible, when we draw a border across the component using drawLine, and expected that fillRect will clear a border of the component. This is incorrect because in the case of the scaled graphics(retina) some part of the line can be placed outside of the bounds of the rectangle. See additional information here: > https://bugs.openjdk.java.net/browse/JDK-8011764 > > This bug has occurred when the old default metal theme is used(DefaultMetalTheme) or thems based on it(Custom themes in the SwingSet2). > > The fix applies the clip before the rendering so the paint method will not touch pixels outside the component. > > As a fix, we could try to draw the lines using subpixel coordinates, but that code is expected to work using Graphics object(unlike current default metal theme: Ocean) which uses the only int as a coordinate, not a Graphics2D > > To make rendering a little bit better I tried antialiasing but it does not produce a better result, so did not use it in the fix. This pull request has now been integrated. Changeset: 9d7121c1 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/9d7121c1 Stats: 192 lines in 3 files changed: 177 ins; 2 del; 13 mod 8256713: SwingSet2 : Slider leaves tracks in uiScale=2 Reviewed-by: jdv, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/1373 From serb at openjdk.java.net Thu Nov 26 04:45:58 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 26 Nov 2020 04:45:58 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails In-Reply-To: <-3MWzl2XJ7KjbSdtS3LZpz4mqE2hG4MLa5iL8XnDQLE=.1951234f-6a8c-4414-849b-c0f53ac52c16@github.com> References: <-3MWzl2XJ7KjbSdtS3LZpz4mqE2hG4MLa5iL8XnDQLE=.1951234f-6a8c-4414-849b-c0f53ac52c16@github.com> Message-ID: On Wed, 25 Nov 2020 17:48:06 GMT, Alexander Zuev wrote: >> Here is a fix for one of the annoying bug, which causes random test failures in the CI. >> >> We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. >> >> Currently, it is implemented in this way: >> 1. Flush the EventQueue, so all old events will be posted to EDT. >> 2. Flush the native event queue, by posting the native event. >> 3. Flush the EDT, by posting a java event. >> 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. >> >> It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). >> >> But it has the next disadvantages: >> - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. >> - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. >> - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). >> >> >> The fix: >> - Add a small delay to the method, so the app can do something useful when waitForIdle() is called >> - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded >> - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. >> >> Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: >> EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); >> It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. > > src/java.desktop/share/classes/sun/awt/SunToolkit.java line 1383: > >> 1381: it.next().modalityPopped(ev); >> 1382: } >> 1383: } > > I think that the rationale behind this exception as that in case of really stuck loop we could identify it. Why are we throwing it away? Now when we exceed the maximum allowed number of iterations we are assuming that the native event queue synchronization happened while it might not be the case. Yes, that was the initial goal, but currently, it does not work well if some of the components use animation and periodically repainted we hit this exception. ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From serb at openjdk.java.net Thu Nov 26 04:52:17 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 26 Nov 2020 04:52:17 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails [v2] In-Reply-To: References: Message-ID: > Here is a fix for one of the annoying bug, which causes random test failures in the CI. > > We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. > > Currently, it is implemented in this way: > 1. Flush the EventQueue, so all old events will be posted to EDT. > 2. Flush the native event queue, by posting the native event. > 3. Flush the EDT, by posting a java event. > 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. > > It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). > > But it has the next disadvantages: > - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. > - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. > - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). > > > The fix: > - Add a small delay to the method, so the app can do something useful when waitForIdle() is called > - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded > - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. > > Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: > EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); > It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/java/awt/Robot/InfiniteLoopException.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1424/files - new: https://git.openjdk.java.net/jdk/pull/1424/files/1bbd7ba1..1229546b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1424&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1424&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1424.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1424/head:pull/1424 PR: https://git.openjdk.java.net/jdk/pull/1424 From serb at openjdk.java.net Thu Nov 26 04:52:18 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 26 Nov 2020 04:52:18 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails [v2] In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 04:49:39 GMT, Sergey Bylokhov wrote: >> Here is a fix for one of the annoying bug, which causes random test failures in the CI. >> >> We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. >> >> Currently, it is implemented in this way: >> 1. Flush the EventQueue, so all old events will be posted to EDT. >> 2. Flush the native event queue, by posting the native event. >> 3. Flush the EDT, by posting a java event. >> 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. >> >> It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). >> >> But it has the next disadvantages: >> - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. >> - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. >> - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). >> >> >> The fix: >> - Add a small delay to the method, so the app can do something useful when waitForIdle() is called >> - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded >> - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. >> >> Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: >> EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); >> It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/java/awt/Robot/InfiniteLoopException.java test/jdk/java/awt/Robot/InfiniteLoopException.java line 63: > 61: long time = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start); > 62: if (time > 20) { > 63: throw new RuntimeException("To slow:" + time); Suggestion: throw new RuntimeException("Too slow:" + time); ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From serb at openjdk.java.net Thu Nov 26 04:52:19 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 26 Nov 2020 04:52:19 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails [v2] In-Reply-To: <-3MWzl2XJ7KjbSdtS3LZpz4mqE2hG4MLa5iL8XnDQLE=.1951234f-6a8c-4414-849b-c0f53ac52c16@github.com> References: <-3MWzl2XJ7KjbSdtS3LZpz4mqE2hG4MLa5iL8XnDQLE=.1951234f-6a8c-4414-849b-c0f53ac52c16@github.com> Message-ID: <531EebiGo8bJfvHe3ZrVadlO_nmVpLLi-f_j4y7FOL4=.6cc2a9be-02cd-44ad-956e-cae80209031e@github.com> On Wed, 25 Nov 2020 17:49:22 GMT, Alexander Zuev wrote: >> Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: >> >> Update test/jdk/java/awt/Robot/InfiniteLoopException.java > > test/jdk/java/awt/Robot/InfiniteLoopException.java line 63: > >> 61: long time = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start); >> 62: if (time > 20) { >> 63: throw new RuntimeException("To slow:" + time); > > Typo? Shouldn't it be "Too slow"? yes, fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From kizune at openjdk.java.net Thu Nov 26 05:35:01 2020 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 26 Nov 2020 05:35:01 GMT Subject: RFR: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails [v2] In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 04:52:17 GMT, Sergey Bylokhov wrote: >> Here is a fix for one of the annoying bug, which causes random test failures in the CI. >> >> We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. >> >> Currently, it is implemented in this way: >> 1. Flush the EventQueue, so all old events will be posted to EDT. >> 2. Flush the native event queue, by posting the native event. >> 3. Flush the EDT, by posting a java event. >> 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. >> >> It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). >> >> But it has the next disadvantages: >> - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. >> - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. >> - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). >> >> >> The fix: >> - Add a small delay to the method, so the app can do something useful when waitForIdle() is called >> - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded >> - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. >> >> Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: >> EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); >> It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/java/awt/Robot/InfiniteLoopException.java Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From ihse at openjdk.java.net Thu Nov 26 08:36:00 2020 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 26 Nov 2020 08:36:00 GMT Subject: RFR: 8253753 Enable default constructor warning in client modules In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 19:10:04 GMT, Joe Darcy wrote: > With the default constructors warnings in java.desktop and jdk.accessibility now fixed, the warning should be enabled in the build for those modules. Looks good! Thank you for your continued efforts to clean up the code base. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1420 From serb at openjdk.java.net Thu Nov 26 08:48:02 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 26 Nov 2020 08:48:02 GMT Subject: Integrated: 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails In-Reply-To: References: Message-ID: On Wed, 25 Nov 2020 00:15:11 GMT, Sergey Bylokhov wrote: > Here is a fix for one of the annoying bug, which causes random test failures in the CI. > > We have a method Robot.waitForIdle(), which supposed to wait until the java and the native queue stabilized. The common use case is to click on the button or show the window, and call waitForIdle() which will wait until the native event will be dispatched by the X11/Windows/macOS as well as followed Java event(paint/focus/etc event) will be dispatched to the EDT. > > Currently, it is implemented in this way: > 1. Flush the EventQueue, so all old events will be posted to EDT. > 2. Flush the native event queue, by posting the native event. > 3. Flush the EDT, by posting a java event. > 4. If some events(unrelated to waitForIdle machinery) were dispatched on steps 2. or 3. then repeat since step 1. > > It is implemented that they because the native events caused by the OS usually generate the java events, and the java events may generate native events. So we have to wait for both queues (java/native). > > But it has the next disadvantages: > - It is implemented as a busy loop, which does not give a chance for the application to proceed further since it blocks 3 threads EDT/native toolkit thread like appkit/main thread. > - It throws the InfiniteLoop exception if the number of attempts is bigger than 20. And this limitation is too small because some tests generate much more events during startup. > - Note that the timeout value for the realSync method is 10 seconds, and it was assumed that this method will not be executed longer, but it uses this timeout for all events flushing which can lead up to 600 seconds (20 iters * 3 calls * 10 seconds). > > > The fix: > - Add a small delay to the method, so the app can do something useful when waitForIdle() is called > - The timeout=10 second is taken care of, we calculate the "end" time and exits if it is exceeded > - The maximum number of attempts is increased to 100 and InfiniteLoop is removed. > > Note that I have made one additional change to the new realSync implementation. At the beginning of the method I call: > EventQueue.invokeAndWait(() -> {/*dummy implementation*/}); > It is needed to be sure that we flush the first event on EDT even if we spend more time than 10 seconds. This pull request has now been integrated. Changeset: 973255c4 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/973255c4 Stats: 242 lines in 9 files changed: 192 ins; 20 del; 30 mod 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails Reviewed-by: kizune ------------- PR: https://git.openjdk.java.net/jdk/pull/1424 From github.com+70650887+skodanda at openjdk.java.net Fri Nov 27 08:31:14 2020 From: github.com+70650887+skodanda at openjdk.java.net (skodanda) Date: Fri, 27 Nov 2020 08:31:14 GMT Subject: RFR: 8256187: [TEST_BUG] Automate bug4275046.java test Message-ID: Hi All, Could you please review this fix for JDK16? Problem Description: Automate bug4275046.java test. Fix: This fix includes rewriting the applet based test to a regular java application and its been automated too. ------------- Commit messages: - Have removed all the tabs and replaced with 4 spaces. - This fix includes rewriting the applet based test to a regular java application. Also, the test is being automated by retaining the same functionality as that of applet based app. Changes: https://git.openjdk.java.net/jdk/pull/1462/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1462&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256187 Stats: 192 lines in 1 file changed: 192 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/1462.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1462/head:pull/1462 PR: https://git.openjdk.java.net/jdk/pull/1462 From aivanov at openjdk.java.net Fri Nov 27 08:31:14 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 27 Nov 2020 08:31:14 GMT Subject: RFR: 8256187: [TEST_BUG] Automate bug4275046.java test In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 17:01:16 GMT, skodanda wrote: > Hi All, Could you please review this fix for JDK16? > > Problem Description: Automate bug4275046.java test. > > Fix: This fix includes rewriting the applet based test to a regular java application and its been automated too. Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTable/4275046/bug4275046.java line 179: > 177: editedValue = table.getModel().getValueAt(0, 1); > 178: System.out.println("The edited value is = " + editedValue); > 179: testResult = editedValue.equals(EXPECTED_VALUE); The indentation is wrong: the body of the method must be indented by four spaces. There are other misindented blocks; maybe it's because of the tabs in the file. Please correct indentation. ------------- PR: https://git.openjdk.java.net/jdk/pull/1462 From aivanov at openjdk.java.net Fri Nov 27 12:39:56 2020 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 27 Nov 2020 12:39:56 GMT Subject: RFR: 8256187: [TEST_BUG] Automate bug4275046.java test In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 17:01:16 GMT, skodanda wrote: > Hi All, Could you please review this fix for JDK16? > > Problem Description: Automate bug4275046.java test. > > Fix: This fix includes rewriting the applet based test to a regular java application and its been automated too. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1462 From darcy at openjdk.java.net Fri Nov 27 21:34:54 2020 From: darcy at openjdk.java.net (Joe Darcy) Date: Fri, 27 Nov 2020 21:34:54 GMT Subject: Integrated: 8253753 Enable default constructor warning in client modules In-Reply-To: References: Message-ID: On Tue, 24 Nov 2020 19:10:04 GMT, Joe Darcy wrote: > With the default constructors warnings in java.desktop and jdk.accessibility now fixed, the warning should be enabled in the build for those modules. This pull request has now been integrated. Changeset: 65137ff0 Author: Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/65137ff0 Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod 8253753: Enable default constructor warning in client modules Reviewed-by: prr, serb, ihse ------------- PR: https://git.openjdk.java.net/jdk/pull/1420 From psadhukhan at openjdk.java.net Mon Nov 30 04:51:55 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 04:51:55 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: On Wed, 25 Nov 2020 03:19:32 GMT, Prasanta Sadhukhan wrote: >>> When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color. >>> It would be wrong to assume that Apple only uses named colors in their UIs. >>> The named colors are for application developers, not for Apple itself. >> >> The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it. > > Since color of tabpane is controlled by Apple, Can you point me to the code where we call Apple api to draw the color of tabpane? Since the apple forum post is still unanswered and if we want it to be fixed for JDK16, I dont see any other alternative than to fix by what I did in the 1st iteration of this by hardcoding. I dont think we are going to enable dark mode in JDk16 so we will have time to think on that when we enable that and hopefully Apple will come back by that time and we can revisit this. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Mon Nov 30 08:56:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 08:56:57 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> Message-ID: <8B_8kveKu6tB1Ob76SW3zQX8QowY_U3r2-VM1QxXsmY=.45a9100b-8ad4-40b7-a316-00b39735d8f0@github.com> On Mon, 30 Nov 2020 04:49:25 GMT, Prasanta Sadhukhan wrote: >> Since color of tabpane is controlled by Apple, Can you point me to the code where we call Apple api to draw the color of tabpane? > > Since the apple forum post is still unanswered and if we want it to be fixed for JDK16, I dont see any other alternative than to fix by what I did in the 1st iteration of this by hardcoding. I dont think we are going to enable dark mode in JDk16 so we will have time to think on that when we enable that and hopefully Apple will come back by that time and we can revisit this. I dot see any further legibility issue with dark mode in macos11 (set with General->Theme)with SwingSet2 unless there's a dark mode commandline option to enable it for Java, which I am unaware of. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From psadhukhan at openjdk.java.net Mon Nov 30 14:52:04 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 14:52:04 GMT Subject: RFR: 8256187: [TEST_BUG] Automate bug4275046.java test In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 17:01:16 GMT, skodanda wrote: > Hi All, Could you please review this fix for JDK16? > > Problem Description: Automate bug4275046.java test. > > Fix: This fix includes rewriting the applet based test to a regular java application and its been automated too. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/1462 From javalists at cbfiddle.com Mon Nov 30 15:24:56 2020 From: javalists at cbfiddle.com (Alan Snyder) Date: Mon, 30 Nov 2020 07:24:56 -0800 Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: <8B_8kveKu6tB1Ob76SW3zQX8QowY_U3r2-VM1QxXsmY=.45a9100b-8ad4-40b7-a316-00b39735d8f0@github.com> References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> <8B_8kveKu6tB1Ob76SW3zQX8QowY_U3r2-VM1QxXsmY=.45a9100b-8ad4-40b7-a316-00b39735d8f0@github.com> Message-ID: Isn?t that what -Dapple.awt.application.appearance=system does? > On Nov 30, 2020, at 12:56 AM, Prasanta Sadhukhan wrote: > > On Mon, 30 Nov 2020 04:49:25 GMT, Prasanta Sadhukhan wrote: > >>> Since color of tabpane is controlled by Apple, Can you point me to the code where we call Apple api to draw the color of tabpane? >> >> Since the apple forum post is still unanswered and if we want it to be fixed for JDK16, I dont see any other alternative than to fix by what I did in the 1st iteration of this by hardcoding. I dont think we are going to enable dark mode in JDk16 so we will have time to think on that when we enable that and hopefully Apple will come back by that time and we can revisit this. > > I dot see any further legibility issue with dark mode in macos11 (set with General->Theme)with SwingSet2 unless there's a dark mode commandline option to enable it for Java, which I am unaware of. > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/1182 > From psadhukhan at openjdk.java.net Mon Nov 30 15:45:56 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 15:45:56 GMT Subject: RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible In-Reply-To: <8B_8kveKu6tB1Ob76SW3zQX8QowY_U3r2-VM1QxXsmY=.45a9100b-8ad4-40b7-a316-00b39735d8f0@github.com> References: <1tz535gufWoNJ_jO-3KwmSsOfDHQN9Cqz-lvespNJpU=.bac9344b-310c-4af4-a623-0a29b2cc4eec@github.com> <5EU6riZkVpPCEF4g9XxJMtyfXiFEeV5A7Dd506uBn_w=.c3f68824-7756-4049-a3e2-52156bd8f014@github.com> <8B_8kveKu6tB1Ob76SW3zQX8QowY_U3r2-VM1QxXsmY=.45a9100b-8ad4-40b7-a316-00b39735d8f0@github.com> Message-ID: On Mon, 30 Nov 2020 08:54:20 GMT, Prasanta Sadhukhan wrote: >> Since the apple forum post is still unanswered and if we want it to be fixed for JDK16, I dont see any other alternative than to fix by what I did in the 1st iteration of this by hardcoding. I dont think we are going to enable dark mode in JDk16 so we will have time to think on that when we enable that and hopefully Apple will come back by that time and we can revisit this. > > I dot see any further legibility issue with dark mode in macos11 (set with General->Theme)with SwingSet2 unless there's a dark mode commandline option to enable it for Java, which I am unaware of. Ok. Tried that but it does not affect tabPane legibility issue more than what it is seen in normal theme, so the 1st fix should be ok. ------------- PR: https://git.openjdk.java.net/jdk/pull/1182 From serb at openjdk.java.net Mon Nov 30 17:33:58 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 30 Nov 2020 17:33:58 GMT Subject: RFR: 8048109: JToggleButton does not fire actionPerformed under certain conditions [v2] In-Reply-To: References: Message-ID: On Wed, 14 Oct 2020 01:52:35 GMT, Sergey Bylokhov wrote: >> Tejpal Rebari has updated the pull request incrementally with one additional commit since the last revision: >> >> modified the test after suggestions > > Changes requested by serb (Reviewer). @prsadhuk looks like your comment was added using the wrong account. ------------- PR: https://git.openjdk.java.net/jdk/pull/600 From github.com+70650887+skodanda at openjdk.java.net Mon Nov 30 17:40:01 2020 From: github.com+70650887+skodanda at openjdk.java.net (skodanda) Date: Mon, 30 Nov 2020 17:40:01 GMT Subject: Integrated: 8256187: [TEST_BUG] Automate bug4275046.java test In-Reply-To: References: Message-ID: On Thu, 26 Nov 2020 17:01:16 GMT, skodanda wrote: > Hi All, Could you please review this fix for JDK16? > > Problem Description: Automate bug4275046.java test. > > Fix: This fix includes rewriting the applet based test to a regular java application and its been automated too. This pull request has now been integrated. Changeset: 8aaee53c Author: skodanda <70650887+skodanda at users.noreply.github.com> Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/8aaee53c Stats: 192 lines in 1 file changed: 192 ins; 0 del; 0 mod 8256187: [TEST_BUG] Automate bug4275046.java test Reviewed-by: aivanov, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/1462 From psadhukhan at openjdk.java.net Mon Nov 30 17:46:00 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 17:46:00 GMT Subject: RFR: 8048109: JToggleButton does not fire actionPerformed under certain conditions [v2] In-Reply-To: References: Message-ID: On Mon, 30 Nov 2020 17:30:53 GMT, Sergey Bylokhov wrote: >> Changes requested by serb (Reviewer). > > @prsadhuk looks like your comment was added using the wrong account. not wrong but different account but that doesnot make the comment invalid, I guess. ------------- PR: https://git.openjdk.java.net/jdk/pull/600 From serb at openjdk.java.net Mon Nov 30 17:51:04 2020 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 30 Nov 2020 17:51:04 GMT Subject: RFR: 8048109: JToggleButton does not fire actionPerformed under certain conditions [v2] In-Reply-To: References: Message-ID: On Mon, 30 Nov 2020 17:43:10 GMT, Prasanta Sadhukhan wrote: > not wrong but different account but that doesnot make the comment invalid, I guess. But nobody sees it, it is hidden. ------------- PR: https://git.openjdk.java.net/jdk/pull/600 From psadhukhan at openjdk.java.net Mon Nov 30 17:56:57 2020 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 30 Nov 2020 17:56:57 GMT Subject: RFR: 8048109: JToggleButton does not fire actionPerformed under certain conditions [v2] In-Reply-To: References: Message-ID: On Mon, 30 Nov 2020 17:47:47 GMT, Sergey Bylokhov wrote: >> not wrong but different account but that doesnot make the comment invalid, I guess. > >> not wrong but different account but that doesnot make the comment invalid, I guess. > > But nobody sees it, it is hidden. Well, the comment was added on Oct 15 and it got hidden on Oct28 because the ac was not of github author/committer. I think the fix submitter should have seen the comment lying there for 2 weeks before it got hidden. ------------- PR: https://git.openjdk.java.net/jdk/pull/600