Fixed computation of max-element-size for bug #12384; don't compute line-height in this class
git-svn-id: svn://10.0.0.236/trunk@44928 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -96,14 +96,13 @@ nsLineLayout::nsLineLayout(nsIPresContext& aPresContext,
|
||||
mSpaceManager(aSpaceManager),
|
||||
mBlockReflowState(aOuterReflowState),
|
||||
mBlockRS(nsnull),/* XXX temporary */
|
||||
mMinLineHeight(0),
|
||||
mComputeMaxElementSize(aComputeMaxElementSize)
|
||||
{
|
||||
// Stash away some style data that we need
|
||||
aOuterReflowState->frame->GetStyleData(eStyleStruct_Text,
|
||||
(const nsStyleStruct*&) mStyleText);
|
||||
mTextAlign = mStyleText->mTextAlign;
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(mPresContext,
|
||||
aOuterReflowState->frame);
|
||||
mLineNumber = 0;
|
||||
mColumn = 0;
|
||||
mEndsInWhiteSpace = PR_TRUE;
|
||||
@@ -511,8 +510,16 @@ nsLineLayout::EndSpan(nsIFrame* aFrame,
|
||||
aSizeResult.width = width;
|
||||
aSizeResult.height = maxHeight;
|
||||
if (aMaxElementSize) {
|
||||
aMaxElementSize->width = maxElementWidth;
|
||||
aMaxElementSize->height = maxElementHeight;
|
||||
if (psd->mNoWrap) {
|
||||
// When we have a non-breakable span, it's max-element-size
|
||||
// width is its entire width.
|
||||
aMaxElementSize->width = width;
|
||||
aMaxElementSize->height = maxHeight;
|
||||
}
|
||||
else {
|
||||
aMaxElementSize->width = maxElementWidth;
|
||||
aMaxElementSize->height = maxElementHeight;
|
||||
}
|
||||
}
|
||||
|
||||
mSpanDepth--;
|
||||
|
||||
Reference in New Issue
Block a user