nsAutoString eventType; aEvent->GetType(eventType);
nsXFormsMessageElement::HandleEphemeralMessage(nsIDOMDocument* aDoc,                                               nsIDOMEvent* aEvent){  if (!aEvent)    return NS_OK;  /// @bug How to handle the following:  ///      <message level="ephemeral" src="http://mozilla.org"/>  nsCOMPtr<nsIDOMEventTarget> target;  aEvent->GetTarget(getter_AddRefs(target));  nsCOMPtr<nsIDOMElement> targetEl(do_QueryInterface(target));  if (targetEl) {    nsCOMPtr<nsIDOMNSDocument> nsDoc(do_QueryInterface(aDoc));    if (nsDoc) {      PRInt32 oldX = mPosX;      PRInt32 oldY = mPosY;      nsCOMPtr<nsIBoxObject> box;      nsDoc->GetBoxObjectFor(targetEl, getter_AddRefs(box));      if (box) {        box->GetX(&mPosX);        box->GetY(&mPosY);        PRInt32 height;        box->GetHeight(&height);        mPosX += 10;        mPosY = mPosY + height;        // Move the ephemeral message a bit upwards if the        // box object of the event target is large enough.        // This makes it more clear to which element the         // message is related to.        if (height > 20)          mPosY -= height > 30 ? 10 : 10 - (30 - height);      }            nsAutoString eventType;      aEvent->GetType(eventType);      // A special case for hints to make them work more like      // normal tooltips.      if (eventType.EqualsLiteral("xforms-hint") &&          mPosX == oldX && mPosY == oldY) {        return NS_OK;      }      nsAutoString instanceData;      PRBool hasBinding = nsXFormsUtils::GetSingleNodeBindingValue(mElement,                                                                   instanceData);      if (hasBinding) {        nsCOMPtr<nsIDOM3Node> visualElement3(do_QueryInterface(mVisualElement));        if (visualElement3) {          visualElement3->SetTextContent(instanceData);        }      }      StartEphemeral();    }  }  return NS_OK;}