This commit is contained in:
kipp%netscape.com 1999-03-26 00:37:22 +00:00
Родитель 7266ef060d
Коммит 35bac488eb
2 изменённых файлов: 34 добавлений и 22 удалений

Просмотреть файл

@ -65,8 +65,7 @@ BRFrame::Paint(nsIPresContext& aPresContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
if ((eFramePaintLayer_Overlay == aWhichLayer) &&
nsIFrame::GetShowFrameBorders()) {
if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) {
float p2t;
aPresContext.GetPixelsToTwips(&p2t);
nscoord five = NSIntPixelsToTwips(5, p2t);
@ -90,7 +89,10 @@ BRFrame::Reflow(nsIPresContext& aPresContext,
aMetrics.width = 0;
aMetrics.ascent = 0;
aMetrics.descent = 0;
NS_ASSERTION(nsnull != aReflowState.lineLayout, "no line layout");
// Only when the BR is operating in a line-layout situation will it
// behave like a BR.
if (nsnull != aReflowState.lineLayout) {
aReflowState.lineLayout->SetBRFrame(this);
// Return our reflow status
@ -101,5 +103,9 @@ BRFrame::Reflow(nsIPresContext& aPresContext,
aStatus = NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER |
NS_INLINE_MAKE_BREAK_TYPE(breakType);
}
else {
aStatus = NS_FRAME_COMPLETE;
}
return NS_OK;
}

Просмотреть файл

@ -65,8 +65,7 @@ BRFrame::Paint(nsIPresContext& aPresContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
if ((eFramePaintLayer_Overlay == aWhichLayer) &&
nsIFrame::GetShowFrameBorders()) {
if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) {
float p2t;
aPresContext.GetPixelsToTwips(&p2t);
nscoord five = NSIntPixelsToTwips(5, p2t);
@ -90,7 +89,10 @@ BRFrame::Reflow(nsIPresContext& aPresContext,
aMetrics.width = 0;
aMetrics.ascent = 0;
aMetrics.descent = 0;
NS_ASSERTION(nsnull != aReflowState.lineLayout, "no line layout");
// Only when the BR is operating in a line-layout situation will it
// behave like a BR.
if (nsnull != aReflowState.lineLayout) {
aReflowState.lineLayout->SetBRFrame(this);
// Return our reflow status
@ -101,5 +103,9 @@ BRFrame::Reflow(nsIPresContext& aPresContext,
aStatus = NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER |
NS_INLINE_MAKE_BREAK_TYPE(breakType);
}
else {
aStatus = NS_FRAME_COMPLETE;
}
return NS_OK;
}