Bug 413274 - ""ASSERTION: How can this ever happen?: '*aUnconstrainedSize <= scriptLevelSize'"" [p=vladimir.sukhoy@gmail.com (Vlad Sukhoy) r+sr=roc a1.9=beltzner]

git-svn-id: svn://10.0.0.236/trunk@244095 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2008-01-27 03:55:40 +00:00
parent 4346bb799f
commit 1fce33cc48

View File

@@ -1969,12 +1969,15 @@ ComputeScriptLevelSize(const nsStyleFont* aFont, const nsStyleFont* aParentFont,
double scriptLevelScale =
pow(aParentFont->mScriptSizeMultiplier, scriptLevelChange);
// Compute the size we would have had if minscriptsize had never been applied
// Compute the size we would have had if minscriptsize had never been
// applied, also prevent overflow (bug 413274)
*aUnconstrainedSize =
NSToCoordRound(aParentFont->mScriptUnconstrainedSize*scriptLevelScale);
NSToCoordRound(PR_MIN(aParentFont->mScriptUnconstrainedSize*scriptLevelScale,
nscoord_MAX));
// Compute the size we could get via scriptlevel change
nscoord scriptLevelSize =
NSToCoordRound(aParentFont->mSize*scriptLevelScale);
NSToCoordRound(PR_MIN(aParentFont->mSize*scriptLevelScale,
nscoord_MAX));
if (scriptLevelScale <= 1.0) {
if (aParentFont->mSize <= minScriptSize) {
// We can't decrease the font size at all, so just stick to no change