if (NS_CONTENT_ATTR_NOT_THERE ==  mInner.GetAttribute(kNameSpaceID_None, nsHTMLAtoms::width, aValue)) { nsImageFrame* imageFrame;  result = GetImageFrame(&imageFrame); if (NS_SUCCEEDED(result)) { nsSize size; imageFrame->GetIntrinsicImageSize(size); aValue.AppendInt(size.width);
if (rv == NS_CONTENT_ATTR_NOT_THERE) { PRInt32 width = 0;  aValue.Truncate();   if (NS_SUCCEEDED(GetWidth(&width)) && width) { aValue.AppendInt(width); aValue.AppendWithConversion("px");
nsHTMLImageElement::GetWidth(nsString& aValue){  nsresult result;  if (NS_CONTENT_ATTR_NOT_THERE ==  mInner.GetAttribute(kNameSpaceID_None, nsHTMLAtoms::width, aValue)) {    nsImageFrame* imageFrame;        result = GetImageFrame(&imageFrame);    if (NS_SUCCEEDED(result)) {      nsSize size;      imageFrame->GetIntrinsicImageSize(size);      aValue.AppendInt(size.width);    }  }  return NS_OK;}