From dd5de649f52b1827ea5e6a0fab899b5499d7bc8e Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 27 Aug 1999 21:47:39 +0000 Subject: [PATCH] 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 --- mozilla/layout/generic/nsBulletFrame.cpp | 16 +++++----------- mozilla/layout/html/base/src/nsBulletFrame.cpp | 16 +++++----------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 4c30530559e..cef44c84fbb 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -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 shell; rv = aPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) { diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 4c30530559e..cef44c84fbb 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -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 shell; rv = aPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) {