Wrap created frames in a view if necessary

This commit is contained in:
kipp 1998-06-03 15:57:08 +00:00
parent a749574762
commit bdcfe7d55f
2 changed files with 18 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#include "nsCRT.h"
#include "nsReflowCommand.h"
#include "nsIFontMetrics.h"
#include "nsHTMLFrame.h"
#undef NOISY_REFLOW
@ -1399,6 +1400,14 @@ nsLineLayout::CreateFrameFor(nsIContent* aKid)
if (NS_OK != rv) {
return rv;
}
if (NS_OK == rv) {
// Wrap the frame in a view if necessary
rv = nsHTMLFrame::CreateViewForFrame(mPresContext, kidFrame, kidSC,
PR_FALSE);
if (NS_OK != rv) {
return rv;
}
}
mState.mKidFrame = kidFrame;
mNewFrames++;

View File

@ -30,6 +30,7 @@
#include "nsCRT.h"
#include "nsReflowCommand.h"
#include "nsIFontMetrics.h"
#include "nsHTMLFrame.h"
#undef NOISY_REFLOW
@ -1399,6 +1400,14 @@ nsLineLayout::CreateFrameFor(nsIContent* aKid)
if (NS_OK != rv) {
return rv;
}
if (NS_OK == rv) {
// Wrap the frame in a view if necessary
rv = nsHTMLFrame::CreateViewForFrame(mPresContext, kidFrame, kidSC,
PR_FALSE);
if (NS_OK != rv) {
return rv;
}
}
mState.mKidFrame = kidFrame;
mNewFrames++;