зеркало из https://github.com/mozilla/gecko-dev.git
Fixed computation of max-element-size for bug #12384; don't compute line-height in this class
This commit is contained in:
Родитель
07283caa5c
Коммит
bcb6fd2f40
|
@ -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--;
|
||||
|
|
|
@ -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--;
|
||||
|
|
Загрузка…
Ссылка в новой задаче