diff --git a/mozilla/content/base/src/nsImageLoadingContent.cpp b/mozilla/content/base/src/nsImageLoadingContent.cpp index 91d2ff29d1a..faa116772c0 100644 --- a/mozilla/content/base/src/nsImageLoadingContent.cpp +++ b/mozilla/content/base/src/nsImageLoadingContent.cpp @@ -98,7 +98,6 @@ nsImageLoadingContent::nsImageLoadingContent() mImageBlockingStatus(nsIContentPolicy::ACCEPT), mLoadingEnabled(PR_TRUE), mStartingLoad(PR_FALSE), - mLoading(PR_FALSE), // mBroken starts out true, since an image without a URI is broken.... mBroken(PR_TRUE), mUserDisabled(PR_FALSE), @@ -163,10 +162,6 @@ nsImageLoadingContent::OnStartContainer(imgIRequest* aRequest, imgIContainer* aContainer) { LOOP_OVER_OBSERVERS(OnStartContainer(aRequest, aContainer)); - - // Have to check for state changes here, since we might have been in - // the LOADING state before. - UpdateImageState(PR_TRUE); return NS_OK; } @@ -545,8 +540,7 @@ nsImageLoadingContent::ImageState() const return (mBroken * NS_EVENT_STATE_BROKEN) | (mUserDisabled * NS_EVENT_STATE_USERDISABLED) | - (mSuppressed * NS_EVENT_STATE_SUPPRESSED) | - (mLoading * NS_EVENT_STATE_LOADING); + (mSuppressed * NS_EVENT_STATE_SUPPRESSED); } void @@ -568,7 +562,7 @@ nsImageLoadingContent::UpdateImageState(PRBool aNotify) PRInt32 oldState = ImageState(); - mLoading = mBroken = mUserDisabled = mSuppressed = PR_FALSE; + mBroken = mUserDisabled = mSuppressed = PR_FALSE; // If we were blocked by server-based content policy, we claim to be // suppressed. If we were blocked by type-based content policy, we claim to @@ -585,8 +579,6 @@ nsImageLoadingContent::UpdateImageState(PRBool aNotify) nsresult rv = mCurrentRequest->GetImageStatus(¤tLoadStatus); if (NS_FAILED(rv) || (currentLoadStatus & imgIRequest::STATUS_ERROR)) { mBroken = PR_TRUE; - } else if (!(currentLoadStatus & imgIRequest::STATUS_SIZE_AVAILABLE)) { - mLoading = PR_TRUE; } } diff --git a/mozilla/content/base/src/nsImageLoadingContent.h b/mozilla/content/base/src/nsImageLoadingContent.h index fe113c974d9..63b20d85644 100644 --- a/mozilla/content/base/src/nsImageLoadingContent.h +++ b/mozilla/content/base/src/nsImageLoadingContent.h @@ -250,7 +250,6 @@ private: * The state we had the last time we checked whether we needed to notify the * document of a state change. These are maintained by UpdateImageState. */ - PRPackedBool mLoading : 1; PRPackedBool mBroken : 1; PRPackedBool mUserDisabled : 1; PRPackedBool mSuppressed : 1; diff --git a/mozilla/content/events/public/nsIEventStateManager.h b/mozilla/content/events/public/nsIEventStateManager.h index 123c27a6ff8..eaa78757c72 100644 --- a/mozilla/content/events/public/nsIEventStateManager.h +++ b/mozilla/content/events/public/nsIEventStateManager.h @@ -177,8 +177,5 @@ public: #define NS_EVENT_STATE_USERDISABLED 0x00010000 // Content suppressed by the user (ad blocking, etc) #define NS_EVENT_STATE_SUPPRESSED 0x00020000 -// Content is still loading such that there is nothing to show the -// user (eg an image which hasn't started coming in yet) -#define NS_EVENT_STATE_LOADING 0x00040000 #endif // nsIEventStateManager_h__ diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index e487683429b..6cd59779429 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -10436,7 +10436,7 @@ nsCSSFrameConstructor::DoContentStateChanged(nsIContent* aContent, nsIFrame* primaryFrame = mPresShell->GetPrimaryFrameFor(aContent); if (primaryFrame) { if (aStateMask & (NS_EVENT_STATE_BROKEN | NS_EVENT_STATE_USERDISABLED | - NS_EVENT_STATE_SUPPRESSED | NS_EVENT_STATE_LOADING)) { + NS_EVENT_STATE_SUPPRESSED)) { hint = nsChangeHint_ReconstructFrame; } else { PRUint8 app = primaryFrame->GetStyleDisplay()->mAppearance; diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index ce15424ce5d..66a95b7702a 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -438,15 +438,14 @@ nsImageFrame::SourceRectToDest(const nsRect& aRect) } static PRBool -ImageOK(PRInt32 aContentState) +ImageOK(nsIContent* aContent) { // Note that we treat NS_EVENT_STATE_SUPPRESSED images as "OK". This means // that we'll construct image frames for them as needed if their display is // toggled from "none" (though we won't paint them, unless their visibility // is changed too). - return !(aContentState & - (NS_EVENT_STATE_BROKEN | NS_EVENT_STATE_USERDISABLED | - NS_EVENT_STATE_LOADING)); + return !(aContent->IntrinsicState() & + (NS_EVENT_STATE_BROKEN | NS_EVENT_STATE_USERDISABLED)); } /* static */ @@ -454,16 +453,10 @@ PRBool nsImageFrame::ShouldCreateImageFrameFor(nsIContent* aContent, nsStyleContext* aStyleContext) { - PRInt32 state = aContent->IntrinsicState(); - if (ImageOK(state)) { + if (ImageOK(aContent)) { // Image is fine; do the image frame thing return PR_TRUE; } - - if ((state & NS_EVENT_STATE_LOADING) && - HaveFixedSize(aStyleContext->GetStylePosition())) { - return PR_TRUE; - } // Check if we want to use a placeholder box with an icon or just // let the the presShell make us into inline text. Decide as follows: @@ -1280,7 +1273,7 @@ nsImageFrame::Paint(nsPresContext* aPresContext, getter_AddRefs(currentRequest)); } - PRBool imageOK = ImageOK(mContent->IntrinsicState()); + PRBool imageOK = ImageOK(mContent); nsCOMPtr imgCon; if (currentRequest) { diff --git a/mozilla/layout/style/html.css b/mozilla/layout/style/html.css index 1e7a6f6b44f..847f413bce5 100644 --- a/mozilla/layout/style/html.css +++ b/mozilla/layout/style/html.css @@ -394,7 +394,6 @@ hr[size="1"] { img:-moz-broken::before, input:-moz-broken::before, img:-moz-user-disabled::before, input:-moz-user-disabled::before, -img:-moz-loading::before, input:-moz-loading::before, /* Nonempty applets should just show their kids. XXXbz do we need a selector that will ignore elements? */ applet:empty:-moz-broken::before, diff --git a/mozilla/layout/style/nsCSSPseudoClassList.h b/mozilla/layout/style/nsCSSPseudoClassList.h index 54067b169b2..0230cba1061 100644 --- a/mozilla/layout/style/nsCSSPseudoClassList.h +++ b/mozilla/layout/style/nsCSSPseudoClassList.h @@ -80,7 +80,6 @@ CSS_PSEUDO_CLASS(onlyChild, ":only-child") CSS_PSEUDO_CLASS(mozBroken, ":-moz-broken") CSS_PSEUDO_CLASS(mozUserDisabled, ":-moz-user-disabled") CSS_PSEUDO_CLASS(mozSuppressed, ":-moz-suppressed") -CSS_PSEUDO_CLASS(mozLoading, ":-moz-loading") // CSS 3 UI // http://www.w3.org/TR/2004/CR-css3-ui-20040511/#pseudo-classes diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 55bd352fd49..a7a81fa845a 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -3145,9 +3145,6 @@ static PRBool SelectorMatches(RuleProcessorData &data, else if (nsCSSPseudoClasses::mozSuppressed == pseudoClass->mAtom) { result = STATE_CHECK(NS_EVENT_STATE_SUPPRESSED); } - else if (nsCSSPseudoClasses::mozLoading == pseudoClass->mAtom) { - result = STATE_CHECK(NS_EVENT_STATE_LOADING); - } else if (nsCSSPseudoClasses::required == pseudoClass->mAtom) { result = STATE_CHECK(NS_EVENT_STATE_REQUIRED); } @@ -3692,7 +3689,6 @@ PRBool IsStateSelector(nsCSSSelector& aSelector) (pseudoClass->mAtom == nsCSSPseudoClasses::mozBroken) || (pseudoClass->mAtom == nsCSSPseudoClasses::mozUserDisabled) || (pseudoClass->mAtom == nsCSSPseudoClasses::mozSuppressed) || - (pseudoClass->mAtom == nsCSSPseudoClasses::mozLoading) || (pseudoClass->mAtom == nsCSSPseudoClasses::required) || (pseudoClass->mAtom == nsCSSPseudoClasses::optional) || (pseudoClass->mAtom == nsCSSPseudoClasses::valid) ||