if (formControl) { if (formControl->GetType() == NS_FORM_INPUT_HIDDEN) { return new NS_ConvertASCIItoUTF16(mCharset); }
if (formControl && formControl->GetType() == NS_FORM_INPUT_HIDDEN) { CopyASCIItoUTF16(mCharset, aResult); return NS_OK;
nsFormSubmission::ProcessValue(nsIDOMHTMLElement* aSource,                               const nsAString& aName, const nsAString& aValue){  // Hijack _charset_ (hidden inputs only) for internationalization (bug 18643)  if (aName.EqualsLiteral("_charset_")) {    nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(aSource);    if (formControl) {      if (formControl->GetType() == NS_FORM_INPUT_HIDDEN) {        return new NS_ConvertASCIItoUTF16(mCharset);      }    }  }  nsString* retval = nsnull;  if (mFormProcessor) {    // XXX We need to change the ProcessValue interface to take nsAString    nsString tmpNameStr(aName);    retval = new nsString(aValue);    if (!retval) {      return nsnull;    }#ifdef DEBUG    nsresult rv =#endif    mFormProcessor->ProcessValue(aSource, tmpNameStr, *retval);    NS_ASSERTION(NS_SUCCEEDED(rv), "Unable to Notify form process observer");  }  return retval;}