Make empty bullets (i.e., those for list-style-type:none) not contribute to layout. (Bug 512631) r=roc

This commit is contained in:
L. David Baron
2009-09-11 06:46:36 -04:00
parent da21d49852
commit 58fcd93bdd
7 changed files with 111 additions and 27 deletions

View File

@@ -1332,8 +1332,14 @@ nsLineLayout::AddBulletFrame(nsIFrame* aFrame,
NS_ASSERTION(mCurrentSpan == mRootSpan, "bad linelayout user");
NS_ASSERTION(GetFlag(LL_GOTLINEBOX), "must have line box");
SetFlag(LL_HASBULLET, PR_TRUE);
mLineBox->SetHasBullet();
nsIFrame *blockFrame = mBlockReflowState->frame;
NS_ASSERTION(blockFrame->IsFrameOfType(nsIFrame::eBlockFrame),
"must be for block");
if (!static_cast<nsBlockFrame*>(blockFrame)->BulletIsEmpty()) {
SetFlag(LL_HASBULLET, PR_TRUE);
mLineBox->SetHasBullet();
}
PerFrameData* pfd;
nsresult rv = NewPerFrameData(&pfd);