Backing out 420351

This commit is contained in:
roc+@cs.cmu.edu 2008-03-11 03:44:32 -07:00
parent af1e927e86
commit b099594232
4 changed files with 10 additions and 26 deletions

View File

@ -120,18 +120,6 @@ nsBulletFrame::GetType() const
return nsGkAtoms::bulletFrame;
}
PRBool
nsBulletFrame::IsEmpty()
{
return IsSelfEmpty();
}
PRBool
nsBulletFrame::IsSelfEmpty()
{
return GetStyleList()->mListStyleType == NS_STYLE_LIST_STYLE_NONE;
}
NS_IMETHODIMP
nsBulletFrame::DidSetStyleContext()
{

View File

@ -101,9 +101,6 @@ public:
void PaintBullet(nsIRenderingContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect);
virtual PRBool IsEmpty();
virtual PRBool IsSelfEmpty();
protected:
void GetDesiredSize(nsPresContext* aPresContext,

View File

@ -868,10 +868,10 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// the float. At the same time, check if the frame has any non-collapsed-away
// content.
PRBool placedFloat = PR_FALSE;
PRBool isEmpty;
PRBool hasNoncollapsedContent = PR_TRUE;
if (frameType) {
if (nsGkAtoms::placeholderFrame == frameType) {
isEmpty = PR_TRUE;
hasNoncollapsedContent = PR_FALSE;
pfd->SetFlag(PFD_SKIPWHENTRIMMINGWHITESPACE, PR_TRUE);
nsIFrame* outOfFlowFrame = nsLayoutUtils::GetFloatFromPlaceholder(aFrame);
if (outOfFlowFrame) {
@ -893,8 +893,9 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// Note non-empty text-frames for inline frame compatibility hackery
pfd->SetFlag(PFD_ISTEXTFRAME, PR_TRUE);
nsTextFrame* textFrame = static_cast<nsTextFrame*>(pfd->mFrame);
isEmpty = !textFrame->HasNoncollapsedCharacters();
if (!isEmpty) {
if (!textFrame->HasNoncollapsedCharacters()) {
hasNoncollapsedContent = PR_FALSE;
} else {
pfd->SetFlag(PFD_ISNONEMPTYTEXTFRAME, PR_TRUE);
nsIContent* content = textFrame->GetContent();
@ -923,15 +924,13 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
}
else if (nsGkAtoms::brFrame == frameType) {
pfd->SetFlag(PFD_SKIPWHENTRIMMINGWHITESPACE, PR_TRUE);
isEmpty = PR_FALSE;
} else {
if (nsGkAtoms::letterFrame==frameType) {
pfd->SetFlag(PFD_ISLETTERFRAME, PR_TRUE);
}
if (pfd->mSpan) {
isEmpty = !pfd->mSpan->mHasNonemptyContent && pfd->mFrame->IsSelfEmpty();
} else {
isEmpty = pfd->mFrame->IsEmpty();
if (pfd->mSpan &&
!pfd->mSpan->mHasNonemptyContent && pfd->mFrame->IsSelfEmpty()) {
hasNoncollapsedContent = PR_FALSE;
}
}
}
@ -1013,7 +1012,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
if (CanPlaceFrame(pfd, reflowState, notSafeToBreak, continuingTextRun,
savedOptionalBreakContent != nsnull, metrics,
aReflowStatus, &optionalBreakAfterFits)) {
if (!isEmpty) {
if (hasNoncollapsedContent) {
psd->mHasNonemptyContent = PR_TRUE;
}

View File

@ -752,5 +752,5 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
== 419531-1.html 419531-1-ref.html
== 420069-1.html 420069-1-ref.html
== 420069-2.html 420069-2-ref.html
== 420351-1.html 420351-1-ref.html
# == 420351-1.html 420351-1-ref.html