diff --git a/mozilla/content/base/src/nsImageLoadingContent.cpp b/mozilla/content/base/src/nsImageLoadingContent.cpp index ae29fdb53ef..b78471f962c 100644 --- a/mozilla/content/base/src/nsImageLoadingContent.cpp +++ b/mozilla/content/base/src/nsImageLoadingContent.cpp @@ -419,9 +419,9 @@ nsImageLoadingContent::LoadImageWithChannel(nsIChannel* aChannel, */ nsresult -nsImageLoadingContent::ImageURIChanged(const nsAString& aNewURI, - PRBool aForce, - PRBool aNotify) +nsImageLoadingContent::LoadImage(const nsAString& aNewURI, + PRBool aForce, + PRBool aNotify) { if (!mLoadingEnabled) { FireEvent(NS_LITERAL_STRING("error")); @@ -440,14 +440,14 @@ nsImageLoadingContent::ImageURIChanged(const nsAString& aNewURI, NS_ENSURE_SUCCESS(rv, rv); // XXXbiesi fire onerror if that failed? - return ImageURIChanged(imageURI, aForce, aNotify, doc); + return LoadImage(imageURI, aForce, aNotify, doc); } nsresult -nsImageLoadingContent::ImageURIChanged(nsIURI* aNewURI, - PRBool aForce, - PRBool aNotify, - nsIDocument* aDocument) +nsImageLoadingContent::LoadImage(nsIURI* aNewURI, + PRBool aForce, + PRBool aNotify, + nsIDocument* aDocument) { if (!mLoadingEnabled) { return NS_OK; @@ -555,7 +555,7 @@ nsImageLoadingContent::UpdateImageState(PRBool aNotify) // Ignore this call; we'll update our state when the state changer is // destroyed. Need this to work around the fact that some libpr0n stuff is // actually sync and hence we can get OnStopDecode called while we're still - // under ImageURIChanged, and OnStopDecode doesn't know anything about + // under LoadImage, and OnStopDecode doesn't know anything about // aNotify return; } diff --git a/mozilla/content/base/src/nsImageLoadingContent.h b/mozilla/content/base/src/nsImageLoadingContent.h index 8cb796a55a8..16b0c91179d 100644 --- a/mozilla/content/base/src/nsImageLoadingContent.h +++ b/mozilla/content/base/src/nsImageLoadingContent.h @@ -68,7 +68,7 @@ public: protected: /** - * ImageURIChanged is called by subclasses when the appropriate + * LoadImage is called by subclasses when the appropriate * attributes (eg 'src' for tags) change. The string passed * in is the new uri string; this consolidates the code for getting * the charset, constructing URI objects, and any other incidentals @@ -80,8 +80,8 @@ protected: * @param aNotify If true, nsIDocumentObserver state change notifications * will be sent as needed. */ - nsresult ImageURIChanged(const nsAString& aNewURI, PRBool aForce, - PRBool aNotify); + nsresult LoadImage(const nsAString& aNewURI, PRBool aForce, + PRBool aNotify); /** * ImageState is called by subclasses that are computing their content state. @@ -96,7 +96,7 @@ protected: PRInt32 ImageState() const; /** - * ImageURIChanged is called by subclasses when the appropriate + * LoadImage is called by subclasses when the appropriate * attributes (eg 'src' for tags) change. If callers have an * URI object already available, they should use this method. * @@ -108,8 +108,8 @@ protected: * @param aDocument Optional parameter giving the document this node is in. * This is purely a performance optimization. */ - nsresult ImageURIChanged(nsIURI* aNewURI, PRBool aForce, PRBool aNotify, - nsIDocument* aDocument = nsnull); + nsresult LoadImage(nsIURI* aNewURI, PRBool aForce, PRBool aNotify, + nsIDocument* aDocument = nsnull); /** * helper to get the document for this content (from the nodeinfo @@ -130,7 +130,7 @@ protected: /** * UseAsPrimaryRequest is called by subclasses when they have an existing * imgIRequest that they want this nsImageLoadingContent to use. This may - * effectively be called instead of ImageURIChanged or LoadImageWithChannel. + * effectively be called instead of LoadImage or LoadImageWithChannel. * If aNotify is true, this method will notify on state changes. */ nsresult UseAsPrimaryRequest(imgIRequest* aRequest, PRBool aNotify); diff --git a/mozilla/content/base/src/nsObjectLoadingContent.cpp b/mozilla/content/base/src/nsObjectLoadingContent.cpp index 55cb0e73293..d040015fd46 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.cpp +++ b/mozilla/content/base/src/nsObjectLoadingContent.cpp @@ -699,11 +699,11 @@ nsObjectLoadingContent::ObjectState() const // nsresult -nsObjectLoadingContent::ObjectURIChanged(const nsAString& aURI, - PRBool aNotify, - const nsCString& aTypeHint, - PRBool aForceType, - PRBool aForceLoad) +nsObjectLoadingContent::LoadObject(const nsAString& aURI, + PRBool aNotify, + const nsCString& aTypeHint, + PRBool aForceType, + PRBool aForceLoad) { LOG(("OBJLC [%p]: Loading object: URI string=<%s> notify=%i type=<%s> forcetype=%i forceload=%i\n", this, NS_ConvertUTF16toUTF8(aURI).get(), aNotify, aTypeHint.get(), aForceType, aForceLoad)); @@ -730,15 +730,15 @@ nsObjectLoadingContent::ObjectURIChanged(const nsAString& aURI, return NS_OK; } - return ObjectURIChanged(uri, aNotify, aTypeHint, aForceType, aForceLoad); + return LoadObject(uri, aNotify, aTypeHint, aForceType, aForceLoad); } nsresult -nsObjectLoadingContent::ObjectURIChanged(nsIURI* aURI, - PRBool aNotify, - const nsCString& aTypeHint, - PRBool aForceType, - PRBool aForceLoad) +nsObjectLoadingContent::LoadObject(nsIURI* aURI, + PRBool aNotify, + const nsCString& aTypeHint, + PRBool aForceType, + PRBool aForceLoad) { LOG(("OBJLC [%p]: Loading object: URI=<%p> notify=%i type=<%s> forcetype=%i forceload=%i\n", this, aURI, aNotify, aTypeHint.get(), aForceType, aForceLoad)); @@ -881,7 +881,7 @@ nsObjectLoadingContent::ObjectURIChanged(nsIURI* aURI, switch (newType) { case eType_Image: // Don't notify, because we will take care of that ourselves. - rv = ImageURIChanged(aURI, aForceLoad, PR_FALSE); + rv = LoadImage(aURI, aForceLoad, PR_FALSE); break; case eType_Plugin: rv = Instantiate(aTypeHint, aURI); @@ -1034,7 +1034,7 @@ nsObjectLoadingContent::RemovedFromDocument() mFrameLoader->Destroy(); mFrameLoader = nsnull; - // Clear the current URI, so that ObjectURIChanged doesn't think that we + // Clear the current URI, so that LoadObject doesn't think that we // have already loaded the content. mURI = nsnull; } diff --git a/mozilla/content/base/src/nsObjectLoadingContent.h b/mozilla/content/base/src/nsObjectLoadingContent.h index ea4fbe1fcda..5af935bb855 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.h +++ b/mozilla/content/base/src/nsObjectLoadingContent.h @@ -136,11 +136,11 @@ class nsObjectLoadingContent : public nsImageLoadingContent * @see the URI-taking version of this function for a detailed description * of how a plugin will be found. */ - nsresult ObjectURIChanged(const nsAString& aURI, - PRBool aNotify, - const nsCString& aTypeHint = EmptyCString(), - PRBool aForceType = PR_FALSE, - PRBool aForceLoad = PR_FALSE); + nsresult LoadObject(const nsAString& aURI, + PRBool aNotify, + const nsCString& aTypeHint = EmptyCString(), + PRBool aForceType = PR_FALSE, + PRBool aForceLoad = PR_FALSE); /** * Loads the object from the given URI. * @@ -171,11 +171,11 @@ class nsObjectLoadingContent : public nsImageLoadingContent * @param aForceLoad If true, the object will be refetched even if the URI * is the same as the currently-loaded object. */ - nsresult ObjectURIChanged(nsIURI* aURI, - PRBool aNotify, - const nsCString& aTypeHint = EmptyCString(), - PRBool aForceType = PR_FALSE, - PRBool aForceLoad = PR_FALSE); + nsresult LoadObject(nsIURI* aURI, + PRBool aNotify, + const nsCString& aTypeHint = EmptyCString(), + PRBool aForceType = PR_FALSE, + PRBool aForceLoad = PR_FALSE); enum Capabilities { eSupportImages = PR_BIT(0), // Images are supported (imgILoader) diff --git a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp index 681aa5fc80c..6ca89a27db5 100644 --- a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp @@ -108,7 +108,7 @@ public: virtual PRUint32 GetCapabilities() const; protected: /** - * Calls ObjectURIChanged with the correct arguments to start the plugin + * Calls LoadObject with the correct arguments to start the plugin * load. */ NS_HIDDEN_(void) StartAppletLoad(PRBool aNotify); @@ -278,15 +278,15 @@ nsHTMLAppletElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix, const nsAString& aValue, PRBool aNotify) { - // If we plan to call ObjectURIChanged, we want to do it first so that the + // If we plan to call LoadObject, we want to do it first so that the // object load kicks off _before_ the reflow triggered by the SetAttr. But if // aNotify is false, we are coming from the parser or some such place; we'll // get bound after all the attributes have been set, so we'll do the // object load from BindToTree/DoneAddingChildren. - // Skip the ObjectURIChanged call in that case. + // Skip the LoadObject call in that case. if (aNotify && aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::code) { - ObjectURIChanged(aValue, aNotify, + LoadObject(aValue, aNotify, NS_LITERAL_CSTRING("application/x-java-vm"), PR_TRUE, PR_TRUE); } @@ -301,10 +301,10 @@ nsHTMLAppletElement::StartAppletLoad(PRBool aNotify) { nsAutoString uri; if (GetAttr(kNameSpaceID_None, nsHTMLAtoms::code, uri)) { - ObjectURIChanged(uri, aNotify, - NS_LITERAL_CSTRING("application/x-java-vm"), PR_TRUE); + LoadObject(uri, aNotify, + NS_LITERAL_CSTRING("application/x-java-vm"), PR_TRUE); } else { - // The constructor set the type to eType_Plugin; but if we have no code + // The constructor set the type to eType_Loading; but if we have no code // attribute, then we aren't really a plugin Fallback(aNotify); } diff --git a/mozilla/content/html/content/src/nsHTMLImageElement.cpp b/mozilla/content/html/content/src/nsHTMLImageElement.cpp index d49bb3d58bd..23768d58e8a 100644 --- a/mozilla/content/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLImageElement.cpp @@ -550,11 +550,11 @@ nsHTMLImageElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix, const nsAString& aValue, PRBool aNotify) { - // If we plan to call ImageURIChanged, we want to do it first so that the + // If we plan to call LoadImage, we want to do it first so that the // image load kicks off _before_ the reflow triggered by the SetAttr. But if // aNotify is false, we are coming from the parser or some such place; we'll // get bound after all the attributes have been set, so we'll do the - // image load from BindToTree. Skip the ImageURIChanged call in that case. + // image load from BindToTree. Skip the LoadImage call in that case. if (aNotify && aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::src) { @@ -569,7 +569,7 @@ nsHTMLImageElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, // Force image loading here, so that we'll try to load the image from // network if it's set to be not cacheable... - ImageURIChanged(aValue, PR_TRUE, aNotify); + LoadImage(aValue, PR_TRUE, aNotify); if (mCurrentRequest && !mPendingRequest && oldCurrentRequest != mCurrentRequest) { @@ -604,7 +604,7 @@ nsHTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, if (GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, uri)) { // Note: no need to notify here; since we're just now being bound // we don't have any frames or anything yet. - ImageURIChanged(uri, PR_FALSE, PR_FALSE); + LoadImage(uri, PR_FALSE, PR_FALSE); } return rv; diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index 779a788032f..f2266fbf453 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -431,7 +431,7 @@ nsHTMLInputElement::BeforeSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, } else if (aNotify && aName == nsHTMLAtoms::src && aValue && mType == NS_FORM_INPUT_IMAGE) { // Null value means the attr got unset; don't trigger on that - ImageURIChanged(*aValue, PR_TRUE, aNotify); + LoadImage(*aValue, PR_TRUE, aNotify); } else if (aNotify && aName == nsHTMLAtoms::disabled) { SET_BOOLBIT(mBitField, BF_DISABLED_CHANGED, PR_TRUE); } @@ -525,7 +525,7 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, // whether we have an image to load; nsAutoString src; if (GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, src)) { - ImageURIChanged(src, PR_FALSE, aNotify); + LoadImage(src, PR_FALSE, aNotify); } } } @@ -1685,7 +1685,7 @@ nsHTMLInputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, if (GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, uri)) { // Note: no need to notify here; since we're just now being bound // we don't have any frames or anything yet. - ImageURIChanged(uri, PR_FALSE, PR_FALSE); + LoadImage(uri, PR_FALSE, PR_FALSE); } } diff --git a/mozilla/content/html/content/src/nsHTMLObjectElement.cpp b/mozilla/content/html/content/src/nsHTMLObjectElement.cpp index 7b9f8ea95d8..be3f035820e 100644 --- a/mozilla/content/html/content/src/nsHTMLObjectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLObjectElement.cpp @@ -111,7 +111,7 @@ public: protected: /** - * Calls ObjectURIChanged with the correct arguments to start the plugin + * Calls LoadObject with the correct arguments to start the plugin * load. */ NS_HIDDEN_(void) StartObjectLoad(PRBool aNotify); @@ -223,17 +223,17 @@ nsHTMLObjectElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix, const nsAString& aValue, PRBool aNotify) { - // If we plan to call ObjectURIChanged, we want to do it first so that the + // If we plan to call LoadObject, we want to do it first so that the // object load kicks off _before_ the reflow triggered by the SetAttr. But if // aNotify is false, we are coming from the parser or some such place; we'll // get bound after all the attributes have been set, so we'll do the // object load from BindToTree/DoneAddingChildren. - // Skip the ObjectURIChanged call in that case. + // Skip the LoadObject call in that case. if (aNotify && aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::data) { nsAutoString type; GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, type); - ObjectURIChanged(aValue, aNotify, NS_ConvertUTF16toUTF8(type), PR_FALSE, PR_TRUE); + LoadObject(aValue, aNotify, NS_ConvertUTF16toUTF8(type), PR_FALSE, PR_TRUE); } @@ -426,9 +426,9 @@ nsHTMLObjectElement::StartObjectLoad(PRBool aNotify) // That handles the case where no URI is specified. An empty string would get // interpreted as the page itself, instead of absence of URI. if (!GetAttr(kNameSpaceID_None, nsHTMLAtoms::data, uri)) { - ObjectURIChanged(nsnull, aNotify, ctype); + LoadObject(nsnull, aNotify, ctype); } else { - ObjectURIChanged(uri, aNotify, ctype); + LoadObject(uri, aNotify, ctype); } } diff --git a/mozilla/content/html/content/src/nsHTMLSharedElement.cpp b/mozilla/content/html/content/src/nsHTMLSharedElement.cpp index dd68e5fb029..febc964ed43 100644 --- a/mozilla/content/html/content/src/nsHTMLSharedElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSharedElement.cpp @@ -532,11 +532,11 @@ nsHTMLSharedElement::BindToTree(nsIDocument* aDocument, nsAutoString uri; if (GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, uri)) { // Don't notify: We aren't in a document yet, so we have no frames - ObjectURIChanged(uri, PR_FALSE, NS_ConvertUTF16toUTF8(type), PR_TRUE); + LoadObject(uri, PR_FALSE, NS_ConvertUTF16toUTF8(type), PR_TRUE); } else { // Sometimes, code uses with no src attributes, for example using // code="...". Handle that case. - ObjectURIChanged(nsnull, PR_FALSE, NS_ConvertUTF16toUTF8(type), PR_TRUE); + LoadObject(nsnull, PR_FALSE, NS_ConvertUTF16toUTF8(type), PR_TRUE); } } return rv; @@ -560,16 +560,16 @@ nsHTMLSharedElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify) { if (mNodeInfo->Equals(nsHTMLAtoms::embed)) { - // If we plan to call ObjectURIChanged, we want to do it first so that the + // If we plan to call LoadObject, we want to do it first so that the // image load kicks off _before_ the reflow triggered by the SetAttr. But if // aNotify is false, we are coming from the parser or some such place; we'll // get bound after all the attributes have been set, so we'll do the - // object load from BindToTree. Skip the ObjectURIChanged call in that case. + // object load from BindToTree. Skip the LoadObject call in that case. if (aNotify && aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::src) { nsAutoString type; GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, type); - ObjectURIChanged(aValue, aNotify, NS_ConvertUTF16toUTF8(type), PR_TRUE, PR_TRUE); + LoadObject(aValue, aNotify, NS_ConvertUTF16toUTF8(type), PR_TRUE, PR_TRUE); } } diff --git a/mozilla/content/svg/content/src/nsSVGImageElement.cpp b/mozilla/content/svg/content/src/nsSVGImageElement.cpp index 42a2cc5654e..b090cd21866 100644 --- a/mozilla/content/svg/content/src/nsSVGImageElement.cpp +++ b/mozilla/content/svg/content/src/nsSVGImageElement.cpp @@ -387,7 +387,7 @@ nsSVGImageElement::DidModifySVGObservable(nsISVGValue* aObservable, return NS_OK; } - ImageURIChanged(href, PR_TRUE, PR_TRUE); + LoadImage(href, PR_TRUE, PR_TRUE); } return nsSVGImageElementBase::DidModifySVGObservable(aObservable, aModType);