mButton = do_QueryInterface(inputElement); NS_ENSURE_STATE(mButton);
nsCOMPtr<nsIDOMNode> insertedButton; mVisualContent->AppendChild(button, getter_AddRefs(insertedButton)); mHTMLElement = do_QueryInterface(insertedButton); NS_ENSURE_STATE(mHTMLElement);   nsCOMPtr<nsIDOMElement> span; domDoc->CreateElementNS(NS_LITERAL_STRING(NS_NAMESPACE_XHTML), NS_LITERAL_STRING("span"), getter_AddRefs(span)); NS_ENSURE_STATE(span);  nsCOMPtr<nsIDOMNode> insertedSpan; rv = mHTMLElement->AppendChild(span, getter_AddRefs(insertedSpan)); NS_ENSURE_SUCCESS(rv, rv);  mInsertionPoint = do_QueryInterface(insertedSpan); NS_ENSURE_STATE(mInsertionPoint);
nsXFormsTriggerElement::OnCreated(nsIXTFXMLVisualWrapper *aWrapper){  nsresult rv = nsXFormsControlStub::OnCreated(aWrapper);  NS_ENSURE_SUCCESS(rv, rv);  aWrapper->SetNotificationMask(kStandardNotificationMask |                                nsIXTFElement::NOTIFY_HANDLE_DEFAULT);  ResetHelpAndHint(PR_TRUE);  nsCOMPtr<nsIDOMDocument> domDoc;  mElement->GetOwnerDocument(getter_AddRefs(domDoc));  NS_ENSURE_STATE(domDoc);  nsCOMPtr<nsIDOMElement> inputElement;  domDoc->CreateElementNS(NS_LITERAL_STRING(NS_NAMESPACE_XHTML),                          NS_LITERAL_STRING("button"),                          getter_AddRefs(inputElement));  mButton = do_QueryInterface(inputElement);  NS_ENSURE_STATE(mButton);  return NS_OK;}