зеркало из https://github.com/mozilla/pjs.git
Made sure to set previous bottom margin when restoring reflow state
This commit is contained in:
Родитель
855a687477
Коммит
7b7acfc81c
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
|
@ -1253,18 +1253,25 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
||||||
nsLineData* prevLine = lastLine->mPrevLine;
|
nsLineData* prevLine = lastLine->mPrevLine;
|
||||||
|
|
||||||
state.mY = prevLine->mBounds.YMost();
|
state.mY = prevLine->mBounds.YMost();
|
||||||
|
|
||||||
if (!state.mUnconstrainedHeight) {
|
if (!state.mUnconstrainedHeight) {
|
||||||
state.mAvailSize.height -= state.mY;
|
state.mAvailSize.height -= state.mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This isn't really right...
|
||||||
state.mKidXMost = mRect.XMost();
|
state.mKidXMost = mRect.XMost();
|
||||||
|
|
||||||
#if 0
|
// If the previous line is a block, then factor in its bottom margin
|
||||||
// XXX Set this...
|
if (prevLine->mIsBlock) {
|
||||||
state.mPrevMaxNegBottomMargin = ?;
|
nsStyleSpacing* spacing;
|
||||||
state.mPrevMaxPosBottomMargin = ?;
|
nsIFrame* kid = prevLine->mFirstChild;
|
||||||
#endif
|
|
||||||
|
kid->GetStyleData(kStyleSpacingSID, (nsStyleStruct*&)spacing);
|
||||||
|
if (spacing->mMargin.bottom < 0) {
|
||||||
|
state.mPrevMaxNegBottomMargin = -spacing->mMargin.bottom;
|
||||||
|
} else {
|
||||||
|
state.mPrevMaxPosBottomMargin = spacing->mMargin.bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
|
|
Загрузка…
Ссылка в новой задаче