nsresult nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate)
nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate)
nsresult nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate){  if (!mFrame) return NS_ERROR_NOT_INITIALIZED;    nsCOMPtr<nsIContent> content;  nsresult rv = mFrame->GetContent(getter_AddRefs(content));  if (NS_FAILED(rv))     return rv;  if (!content)     return NS_ERROR_FAILURE;    nsCOMPtr<nsIDocument> doc;  rv = content->GetDocument(*getter_AddRefs(doc));  if (NS_FAILED(rv))     return rv;  if (!doc)    return NS_ERROR_FAILURE;  nsCOMPtr<nsIScriptGlobalObject> scriptGlobalObject;  rv = doc->GetScriptGlobalObject(getter_AddRefs(scriptGlobalObject));  if (NS_FAILED(rv))    return rv;  if (!scriptGlobalObject)    return NS_ERROR_FAILURE;  nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(scriptGlobalObject, &rv);  if (NS_FAILED(rv))    return rv;  if (!domWindow)    return NS_ERROR_FAILURE;  return domWindow->UpdateCommands(commandsToUpdate);}