CheckOverflowing();
CheckOverflowing(PR_FALSE);
nsImageDocument::HandleEvent(nsIDOMEvent* aEvent){  nsAutoString eventType;  aEvent->GetType(eventType);  if (eventType.EqualsLiteral("resize")) {    CheckOverflowing();  }  else if (eventType.EqualsLiteral("click")) {    if (mImageIsResized) {      PRInt32 x = 0, y = 0;      nsCOMPtr<nsIDOMMouseEvent> event(do_QueryInterface(aEvent));      if (event) {        event->GetClientX(&x);        event->GetClientY(&y);        PRInt32 left = 0, top = 0;        nsCOMPtr<nsIDOMNSHTMLElement> nsElement(do_QueryInterface(mImageContent));        nsElement->GetOffsetLeft(&left);        nsElement->GetOffsetTop(&top);        x -= left;        y -= top;      }      RestoreImageTo(x, y);    }    else if (mImageIsOverflowing) {      ShrinkToFit();    }  }  else if (eventType.EqualsLiteral("keypress")) {    nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);    PRUint32 charCode;    keyEvent->GetCharCode(&charCode);    // plus key    if (charCode == 0x2B) {      if (mImageIsResized) {        RestoreImage();      }    }    // minus key    else if (charCode == 0x2D) {      if (mImageIsOverflowing) {        ShrinkToFit();      }    }  }  return NS_OK;}