else if (nsHTMLAtoms::src == aAttribute) { nsAutoString oldSRC; mImageLoader.GetURL(oldSRC); nsAutoString newSRC;  aChild->GetAttribute("src", newSRC); if (!oldSRC.Equals(newSRC)) { mSizeFrozen = PR_TRUE;  #ifdef NS_DEBUG char oldcbuf[100], newcbuf[100]; oldSRC.ToCString(oldcbuf, sizeof(oldcbuf)); newSRC.ToCString(newcbuf, sizeof(newcbuf)); NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("ImageFrame::AttributeChanged: new image source; old='%s' new='%s'", oldcbuf, newcbuf)); #endif   mImageLoader.DestroyLoader();   PRIntn loadStatus; mImageLoader.SetURL(newSRC); mImageLoader.StartLoadImage(aPresContext, this, nsnull, PR_FALSE, loadStatus);  NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("ImageFrame::AttributeChanged: loadImage status=%x", loadStatus));    if (loadStatus & NS_IMAGE_LOAD_STATUS_IMAGE_READY) {  nsRect bounds; nsPoint offset; nsIView* view; GetOffsetFromView(offset, view); nsIViewManager* vm; view->GetViewManager(vm); bounds.x = offset.x; bounds.y = offset.y; bounds.width = mRect.width; bounds.height = mRect.height; vm->UpdateView(view, bounds, 0); NS_RELEASE(vm); } } }
ImageFrame::AttributeChanged(nsIPresShell* aShell,                             nsIPresContext* aPresContext,                             nsIContent* aChild,                             nsIAtom* aAttribute){  nsresult rv = nsLeafFrame::AttributeChanged(aShell, aPresContext, aChild,                                              aAttribute);  if (NS_OK != rv) {    return rv;  }  if ((nsHTMLAtoms::width == aAttribute) ||      (nsHTMLAtoms::height == aAttribute)) {    nsHTMLContainerFrame::ApplyStyleChangeToTree(*aPresContext, this);    nsHTMLContainerFrame::StyleChangeReflow(*aPresContext, this);  }  return NS_OK;}