From 7816e0550c008ceb9c2c3f72bb0bf0aea4cec57a Mon Sep 17 00:00:00 2001 From: "attinasi%netscape.com" Date: Thu, 16 Mar 2000 23:01:03 +0000 Subject: [PATCH] Put an Invalidate call in ::Reflow when the image has changed - image was not repainting before. b=21225 r=buster git-svn-id: svn://10.0.0.236/trunk@63180 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBulletFrame.cpp | 6 ++++++ mozilla/layout/html/base/src/nsBulletFrame.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index ad191c34bbe..22047884de2 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -884,6 +884,12 @@ nsBulletFrame::Reflow(nsIPresContext* aPresContext, mStyleContext->GetStyleData(eStyleStruct_List); if (myList->mListStyleImage != oldImageURL) { mImageLoader.UpdateURLSpec(aPresContext, myList->mListStyleImage); + // XXX - invlidate here is fragile as our parent can choose to change our size + // however currently the parent accepts our size so this works. + // Also, it might be better to invalidate when the image has actually loaded + // instead of when we request the image to load... + // This, however, works as it is currently used (bug 8862 is fixed) + Invalidate(aPresContext, nsRect(0, 0, mRect.width, mRect.height)); } } } diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index ad191c34bbe..22047884de2 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -884,6 +884,12 @@ nsBulletFrame::Reflow(nsIPresContext* aPresContext, mStyleContext->GetStyleData(eStyleStruct_List); if (myList->mListStyleImage != oldImageURL) { mImageLoader.UpdateURLSpec(aPresContext, myList->mListStyleImage); + // XXX - invlidate here is fragile as our parent can choose to change our size + // however currently the parent accepts our size so this works. + // Also, it might be better to invalidate when the image has actually loaded + // instead of when we request the image to load... + // This, however, works as it is currently used (bug 8862 is fixed) + Invalidate(aPresContext, nsRect(0, 0, mRect.width, mRect.height)); } } }