return nsGenericHTMLLeafFormElement::SetAttr(kNameSpaceID_HTML,
return nsGenericHTMLLeafFormElement::SetAttr(kNameSpaceID_None,
nsHTMLInputElement::SetValueSecure(const nsAString& aValue,                                   nsIGfxTextControlFrame2* aFrame,                                   PRBool aCheckSecurity){  PRInt32 type;  GetType(&type);  if (NS_FORM_INPUT_TEXT == type || NS_FORM_INPUT_PASSWORD == type ||      NS_FORM_INPUT_FILE == type) {    if (aCheckSecurity && NS_FORM_INPUT_FILE == type) {      nsresult rv;      nsCOMPtr<nsIScriptSecurityManager> securityManager =                do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);      if (NS_FAILED(rv)) {        return rv;      }      PRBool enabled;      rv = securityManager->IsCapabilityEnabled("UniversalFileRead", &enabled);      if (NS_FAILED(rv)) {        return rv;      }      if (!enabled) {        // setting the value of a "FILE" input widget requires the        // UniversalFileRead privilege        return NS_ERROR_DOM_SECURITY_ERR;      }    }    nsIGfxTextControlFrame2* textControlFrame = aFrame;    nsIFormControlFrame* formControlFrame = textControlFrame;    if (!textControlFrame) {      // No need to flush here, if there's no frame at this point we      // don't need to force creation of one just to tell it about this      // new value.      formControlFrame = GetFormControlFrame(PR_FALSE);      if (formControlFrame) {        CallQueryInterface(formControlFrame, &textControlFrame);      }    }    // File frames always own the value (if the frame is there).    // Text frames have a bit that says whether they own the value.    PRBool frameOwnsValue = PR_FALSE;    if (type == NS_FORM_INPUT_FILE && formControlFrame) {      frameOwnsValue = PR_TRUE;    }    if (textControlFrame) {      textControlFrame->OwnsValue(&frameOwnsValue);    }    if (frameOwnsValue) {      nsCOMPtr<nsIPresContext> presContext;      GetPresContext(this, getter_AddRefs(presContext));      formControlFrame->SetProperty(presContext, nsHTMLAtoms::value, aValue);    } else {      if (mValue) {        nsMemory::Free(mValue);      }      mValue = ToNewUTF8String(aValue);      SetValueChanged(PR_TRUE);      return mValue ? NS_OK : NS_ERROR_OUT_OF_MEMORY;    }    return NS_OK;  }  // Treat value == defaultValue for other input elements.  return nsGenericHTMLLeafFormElement::SetAttr(kNameSpaceID_HTML,                                               nsHTMLAtoms::value,                                               aValue, PR_TRUE);}