diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index c9f718099e7..74321eabd71 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2110,8 +2110,6 @@ NotifyDidPaintSubdocumentCallback(nsIDocument* aDocument, void* aData) void nsPresContext::NotifyDidPaintForSubtree() { - Document()->StyleImageLoader()->NotifyPaint(); - if (!mFireAfterPaintEvents) return; mFireAfterPaintEvents = false; diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp index 9eb88879872..73a4a303e87 100644 --- a/layout/style/ImageLoader.cpp +++ b/layout/style/ImageLoader.cpp @@ -312,7 +312,6 @@ ImageLoader::DoRedraw(FrameSet* aFrameSet) { NS_ASSERTION(aFrameSet, "Must have a frame set"); NS_ASSERTION(mDocument, "Should have returned earlier!"); - NS_ASSERTION(mHavePainted, "Should have returned earlier!"); FrameSet::size_type length = aFrameSet->Length(); for (FrameSet::size_type i = 0; i < length; i++) { @@ -387,7 +386,7 @@ ImageLoader::OnImageIsAnimated(imgIRequest* aRequest) NS_IMETHODIMP ImageLoader::OnStopFrame(imgIRequest *aRequest, PRUint32 aFrame) { - if (!mDocument || !mHavePainted || mInClone) { + if (!mDocument || mInClone) { return NS_OK; } @@ -408,7 +407,7 @@ ImageLoader::FrameChanged(imgIRequest *aRequest, imgIContainer *aContainer, const nsIntRect *aDirtyRect) { - if (!mDocument || !mHavePainted || mInClone) { + if (!mDocument || mInClone) { return NS_OK; } diff --git a/layout/style/ImageLoader.h b/layout/style/ImageLoader.h index 883f5bd6769..d2ccbb8e044 100644 --- a/layout/style/ImageLoader.h +++ b/layout/style/ImageLoader.h @@ -28,7 +28,6 @@ class ImageLoader : public nsStubImageDecoderObserver, public: ImageLoader(nsIDocument* aDocument) : mDocument(aDocument), - mHavePainted(false), mInClone(false) { MOZ_ASSERT(mDocument); @@ -54,11 +53,6 @@ public: imgIContainer *aContainer, const nsIntRect *aDirtyRect); - inline void NotifyPaint() - { - mHavePainted = true; - } - void DropDocumentReference(); void MaybeRegisterCSSImage(nsCSSValue::Image* aImage); @@ -120,9 +114,6 @@ private: // with our document from those Images. ImageHashSet mImages; - // Have we painted yet? If not, no need to deliver notifications. - bool mHavePainted; - // Are we cloning? If so, ignore any notifications we get. bool mInClone; };