nsImageFrame* imageFrame;
if (rv == NS_CONTENT_ATTR_NOT_THERE) { PRInt32 width = 0;
nsHTMLImageElement::GetWidth(PRInt32* aWidth){  NS_ENSURE_ARG_POINTER(aWidth);  *aWidth = 0;  nsImageFrame* imageFrame;  nsresult rv = GetImageFrame(&imageFrame);  if (NS_SUCCEEDED(rv) && imageFrame) {    nsSize size;    imageFrame->GetSize(size);    nsCOMPtr<nsIPresContext> context;    rv = nsGenericHTMLElement::GetPresContext(this, getter_AddRefs(context));    if (NS_SUCCEEDED(rv) && context) {      float t2p;      context->GetTwipsToPixels(&t2p);      *aWidth = NSTwipsToIntPixels(size.width, t2p);    }  } else {    nsHTMLValue value;    rv = mInner.GetHTMLAttribute(nsHTMLAtoms::width, value);    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {      *aWidth = value.GetPixelValue();    }  }  return NS_OK;}