зеркало из https://github.com/mozilla/gecko-dev.git
bug 154741 - use macros instead of NS_FRAME_COMPLETE, a=asa, sr=kin, r=alexsavulov.
This commit is contained in:
Родитель
7a53d72407
Коммит
669f9885af
|
@ -525,11 +525,10 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
|||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_FRAME_COMPLETE != aStatus) {
|
||||
if (!reflowingFirstLetter || NS_INLINE_IS_BREAK(aStatus)) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus))) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
irs.mPrevFrame = frame;
|
||||
frame->GetNextSibling(&frame);
|
||||
|
@ -555,17 +554,16 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
|||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_FRAME_COMPLETE != aStatus) {
|
||||
if (!reflowingFirstLetter || NS_INLINE_IS_BREAK(aStatus)) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus))) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
irs.mPrevFrame = frame;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (NS_FRAME_COMPLETE == aStatus) {
|
||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
||||
// We can't be complete AND have overflow frames!
|
||||
nsIFrame* overflowFrames = GetOverflowFrames(aPresContext, PR_FALSE);
|
||||
NS_ASSERTION(!overflowFrames, "whoops");
|
||||
|
|
|
@ -5444,7 +5444,8 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// - we fit in the available space. We may be complete, but if we
|
||||
// return a larger desired width than is available we may get pushed
|
||||
// and our frame width won't get set
|
||||
if ((NS_FRAME_COMPLETE == aStatus) && (aMetrics.width <= maxWidth)) {
|
||||
if (NS_FRAME_IS_COMPLETE(aStatus) && !NS_INLINE_IS_BREAK(aStatus) &&
|
||||
(aMetrics.width <= maxWidth)) {
|
||||
mState |= TEXT_OPTIMIZE_RESIZE;
|
||||
mRect.width = aMetrics.width;
|
||||
}
|
||||
|
|
|
@ -525,11 +525,10 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
|||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_FRAME_COMPLETE != aStatus) {
|
||||
if (!reflowingFirstLetter || NS_INLINE_IS_BREAK(aStatus)) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus))) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
irs.mPrevFrame = frame;
|
||||
frame->GetNextSibling(&frame);
|
||||
|
@ -555,17 +554,16 @@ nsInlineFrame::ReflowFrames(nsIPresContext* aPresContext,
|
|||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_FRAME_COMPLETE != aStatus) {
|
||||
if (!reflowingFirstLetter || NS_INLINE_IS_BREAK(aStatus)) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if (NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus))) {
|
||||
done = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
irs.mPrevFrame = frame;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (NS_FRAME_COMPLETE == aStatus) {
|
||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
||||
// We can't be complete AND have overflow frames!
|
||||
nsIFrame* overflowFrames = GetOverflowFrames(aPresContext, PR_FALSE);
|
||||
NS_ASSERTION(!overflowFrames, "whoops");
|
||||
|
|
|
@ -5444,7 +5444,8 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// - we fit in the available space. We may be complete, but if we
|
||||
// return a larger desired width than is available we may get pushed
|
||||
// and our frame width won't get set
|
||||
if ((NS_FRAME_COMPLETE == aStatus) && (aMetrics.width <= maxWidth)) {
|
||||
if (NS_FRAME_IS_COMPLETE(aStatus) && !NS_INLINE_IS_BREAK(aStatus) &&
|
||||
(aMetrics.width <= maxWidth)) {
|
||||
mState |= TEXT_OPTIMIZE_RESIZE;
|
||||
mRect.width = aMetrics.width;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче