I confirm that the test pass on linux and mac with the fix and fail
without the fix. Only on windows, it fails.
But I also see that the failure is not because of the fix. The "problem"
was there even before the fix, for example with jdk13 (fails with jdk11,
jdk12 too )
jdk13-b24/bin/java JEditorPaneLayoutTest
Exception in thread "main" java.lang.RuntimeException: Wrong size
java.awt.Dimension[width=183,height=10] expected
java.awt.Dimension[width=177,height=44]
at JEditorPaneLayoutTest.main(JEditorPaneLayoutTest.java:84)
which got somewhat improved by JDK-8217731
<https://bugs.openjdk.java.net/browse/JDK-8217731>
jdk13-b25/bin/java JEditorPaneLayoutTest
Exception in thread "main" java.lang.RuntimeException: Wrong size
java.awt.Dimension[width=181,height=10] expected
java.awt.Dimension[width=180,height=44]
at JEditorPaneLayoutTest.main(JEditorPaneLayoutTest.java:84)
So, the 1 pixel difference in width was there even before this fix and
also this fix fixes the height of the basic text component and the unit
tests of JBS works ok, so to me this fix looks ok to me.
+1 for the fix from me and
I have added the test to problem list only for windows to figure out the
1 pixel difference in width which seems to be because of layouting in
windows.
http://cr.openjdk.java.net/~psadhukhan/8226513/webrev.01/
Regards
Prasanta
On 22-Jul-19 4:01 PM, Prasanta Sadhukhan wrote:
Hi Semyon,
Although the JBS testcase is passing with your change, your testcase
is failing even with the fix for me in windows10
java.lang.RuntimeException: Wrong size
java.awt.Dimension[width=181,height=44] expected
java.awt.Dimension[width=180,height=44]
at JEditorPaneLayoutTest.main(JEditorPaneLayoutTest.java:84)
Regards
Prasanta
On 17-Jul-19 1:33 AM, [email protected] wrote:
bug: https://bugs.openjdk.java.net/browse/JDK-8226513
webrev: http://cr.openjdk.java.net/~ssadetsky/8226513/webrev.00/
The fix adds resetting the root view initialization flag when the
text component underling document is changed and also removes the
check for the zero component size for the root view initialization to
correct the resulting preferred component size in some scenarios when
the root view need to be initially layouted.
--Semyon