if the size attr is ever evaled less than 1 then it is set to 1

b=46224, r=kmcclusk
This commit is contained in:
rods%netscape.com 2000-08-02 22:47:55 +00:00
parent 425d7a8ef8
commit bf1a712ea4

View File

@ -2002,6 +2002,22 @@ nsGfxTextControlFrame2::GetSizeFromContent(PRInt32* aSize) const
}
NS_RELEASE(content);
}
if (*aSize < 1) {
// This is part of bug 46224
// when we can get a PresContent (may be cache it)
// then we can check the compatibility mode
#ifdef FUTURE_ADDITIONAL_FIX_FOR_46224
nsCompatibility mode;
mPresContext->GetCompatibilityMode(&mode);
if (eCompatibility_NavQuirks == mode) {
*aSize = 1;
} else {
*aSize = 20;
}
#else
*aSize = 1;
#endif
}
return result;
}