Ported to new CreateFrame/CreateContinuingFrame APIs; removed some debris code
This commit is contained in:
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
@@ -203,12 +203,16 @@ nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
nsBlockFrame::CreateContinuingFrame(nsIPresContext* aCX,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame*& aContinuingFrame)
|
nsIStyleContext* aStyleContext,
|
||||||
|
nsIFrame*& aContinuingFrame)
|
||||||
{
|
{
|
||||||
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
nsBlockFrame* cf = new nsBlockFrame(mContent, aParent);
|
||||||
PrepareContinuingFrame(aCX, aParent, cf);
|
if (nsnull == cf) {
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
PrepareContinuingFrame(aCX, aParent, aStyleContext, cf);
|
||||||
aContinuingFrame = cf;
|
aContinuingFrame = cf;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -964,37 +968,9 @@ PRBool
|
|||||||
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
nsBlockFrame::MoreToReflow(nsBlockReflowState& aState)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
#if 0
|
if (NextChildOffset() < mContent->ChildCount()) {
|
||||||
// XXX Don't need this anymore now that body has changed...
|
rv = PR_TRUE;
|
||||||
if (aState.mBlockIsPseudo) {
|
|
||||||
// Get the next content object that we would like to reflow
|
|
||||||
PRInt32 kidIndex = NextChildOffset();
|
|
||||||
nsIContentPtr kid = mContent->ChildAt(kidIndex);
|
|
||||||
if (kid.IsNotNull()) {
|
|
||||||
// Resolve style for the kid
|
|
||||||
nsIStyleContextPtr kidSC =
|
|
||||||
aState.mPresContext->ResolveStyleContextFor(kid, this);
|
|
||||||
nsStyleDisplay* kidStyleDisplay = (nsStyleDisplay*)
|
|
||||||
kidSC->GetData(kStyleDisplaySID);
|
|
||||||
switch (kidStyleDisplay->mDisplay) {
|
|
||||||
case NS_STYLE_DISPLAY_BLOCK:
|
|
||||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
|
||||||
// Block pseudo-frames do not contain other block elements
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
rv = PR_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
if (NextChildOffset() < mContent->ChildCount()) {
|
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,7 +1220,17 @@ nsBlockFrame::IncrementalReflow(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reflow unmapped children
|
// Reflow unmapped children
|
||||||
rv = ReflowUnmapped(state);
|
PRInt32 kidIndex = NextChildOffset();
|
||||||
|
PRInt32 contentChildCount = mContent->ChildCount();
|
||||||
|
if (kidIndex == contentChildCount) {
|
||||||
|
// There is nothing to do here
|
||||||
|
if (nsnull != lastLine) {
|
||||||
|
state.mY = lastLine->mBounds.YMost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rv = ReflowUnmapped(state);
|
||||||
|
}
|
||||||
|
|
||||||
// Set return status
|
// Set return status
|
||||||
aStatus = frComplete;
|
aStatus = frComplete;
|
||||||
|
|||||||
Reference in New Issue
Block a user