bug 36322 : Japanese text justification, patch by masayuki@d-toybox.com (r/sr=roc)

git-svn-id: svn://10.0.0.236/trunk@165494 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jshin%mailaps.org
2004-11-19 03:21:12 +00:00
parent ddef9f1d42
commit e9432dbeae
6 changed files with 292 additions and 158 deletions

View File

@@ -2720,9 +2720,7 @@ nsLineLayout::ApplyFrameJustification(PerSpanData* aPSD, FrameJustificationState
if (PR_TRUE == pfd->GetFlag(PFD_ISTEXTFRAME)) {
if (aState->mTotalWidthForSpaces > 0 &&
aState->mTotalNumSpaces > 0 && // we divide by this value, so must be non-zero
aState->mTotalNumLetters >0 // we divide by this value, so must be non-zero
) {
aState->mTotalNumSpaces > 0) {
aState->mNumSpacesProcessed += pfd->mJustificationNumSpaces;
nscoord newAllocatedWidthForSpaces =
@@ -2734,7 +2732,8 @@ nsLineLayout::ApplyFrameJustification(PerSpanData* aPSD, FrameJustificationState
aState->mWidthForSpacesProcessed = newAllocatedWidthForSpaces;
}
if (aState->mTotalWidthForLetters > 0) {
if (aState->mTotalWidthForLetters > 0 &&
aState->mTotalNumLetters > 0) {
aState->mNumLettersProcessed += pfd->mJustificationNumLetters;
nscoord newAllocatedWidthForLetters =