return nsGenericHTMLElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue, aNotify); }
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  // 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 our parent set after all the attributes have been set, so we'll do the  // image load from SetParent.  Skip the ImageURIChanged call in that case.  if (aNotify &&      aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::src) {    // If caller is not chrome and dom.disable_image_src_set is true,    // prevent setting image.src by exiting early    nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));    if (prefBranch) {      PRBool disableImageSrcSet = PR_FALSE;      prefBranch->GetBoolPref("dom.disable_image_src_set", &disableImageSrcSet);      if (disableImageSrcSet && !nsContentUtils::IsCallerChrome()) {        return NS_OK;      }    }    nsCOMPtr<imgIRequest> oldCurrentRequest = mCurrentRequest;    ImageURIChanged(aValue);    if (mCurrentRequest && !mPendingRequest &&        oldCurrentRequest != mCurrentRequest) {      // We have a current request, and it's not the same one as we used      // to have, and we have no pending request.  So imglib already had      // that image.  Reset the animation on it -- see bug 210001      nsCOMPtr<imgIContainer> container;      mCurrentRequest->GetImage(getter_AddRefs(container));      if (container) {        container->ResetAnimation();      }    }  }      return nsGenericHTMLElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue,                                       aNotify);}