Fixed bug 12451 - use list-style-type when image doesn't load or is loading

git-svn-id: svn://10.0.0.236/trunk@44923 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-08-27 21:47:39 +00:00
parent ffd939db74
commit dd5de649f5
2 changed files with 10 additions and 22 deletions

View File

@@ -111,13 +111,7 @@ nsBulletFrame::Paint(nsIPresContext& aCX,
if (myList->mListStyleImage.Length() > 0) {
nsIImage* image = mImageLoader.GetImage();
if (nsnull == image) {
if (!mImageLoader.GetLoadImageFailed()) {
// No image yet
return NS_OK;
}
}
else {
if (image) {
if (!mImageLoader.GetLoadImageFailed()) {
nsRect innerArea(mPadding.left, mPadding.top,
mRect.width - (mPadding.left + mPadding.right),
@@ -125,7 +119,6 @@ nsBulletFrame::Paint(nsIPresContext& aCX,
aRenderingContext.DrawImage(image, innerArea);
return NS_OK;
}
listStyleType = NS_STYLE_LIST_STYLE_DISC;
}
}
@@ -741,9 +734,10 @@ nsBulletFrame::UpdateBulletCB(nsIPresContext* aPresContext,
PRUint32 aStatus)
{
nsresult rv = NS_OK;
if (NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE & aStatus) {
// Now that the size is available, trigger a reflow of the bullet
// frame.
if ((NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE|NS_IMAGE_LOAD_STATUS_ERROR)
& aStatus) {
// Now that the size is available (or an error occurred), trigger
// a reflow of the bullet frame.
nsCOMPtr<nsIPresShell> shell;
rv = aPresContext->GetShell(getter_AddRefs(shell));
if (NS_SUCCEEDED(rv) && shell) {