Make line boxes have the right width when justifying. Bug 309761, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@194200 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2839,7 +2839,9 @@ nsLineLayout::HorizontalAlignFrames(nsRect& aLineBounds,
|
|||||||
if (numSpaces > 0) {
|
if (numSpaces > 0) {
|
||||||
FrameJustificationState state = { numSpaces, numLetters, remainingWidth, 0, 0, 0, 0, 0 };
|
FrameJustificationState state = { numSpaces, numLetters, remainingWidth, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
ApplyFrameJustification(psd, &state);
|
// Apply the justification, and make sure to update our linebox
|
||||||
|
// width to account for it.
|
||||||
|
aLineBounds.width += ApplyFrameJustification(psd, &state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -527,7 +527,11 @@ protected:
|
|||||||
nscoord mWidthForSpacesProcessed;
|
nscoord mWidthForSpacesProcessed;
|
||||||
nscoord mWidthForLettersProcessed;
|
nscoord mWidthForLettersProcessed;
|
||||||
};
|
};
|
||||||
nscoord ApplyFrameJustification(PerSpanData* aPSD, FrameJustificationState* aState);
|
|
||||||
|
// Apply justification. The return value is the amount by which the width of
|
||||||
|
// the span corresponding to aPSD got increased due to justification.
|
||||||
|
nscoord ApplyFrameJustification(PerSpanData* aPSD,
|
||||||
|
FrameJustificationState* aState);
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user