8078483: Apparent endless loop running JEditorPanePaintTest

Reviewed-by: serb, alexsch
This commit is contained in:
Semyon Sadetsky 2015-05-12 09:22:53 +03:00
parent 1c0f1c478f
commit 11215eaec0

View File

@ -936,8 +936,9 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory {
((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