8078483: Apparent endless loop running JEditorPanePaintTest
Reviewed-by: serb, alexsch
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java Tue May 12 09:18:31 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java Tue May 12 09:22:53 2015 +0300
@@ -936,8 +936,9 @@
((AbstractDocument)doc).readLock();
}
try {
- if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) {
- rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom);
+ if ((d.width > (i.left + i.right + caretMargin)) && (d.height > (i.top + i.bottom))) {
+ rootView.setSize(d.width - i.left - i.right -
+ caretMargin, d.height - i.top - i.bottom);
}
else if (d.width == 0 || d.height == 0) {
// Probably haven't been layed out yet, force some sort of