Bug 1436005 - Make type of nsIDOMWindowUtils.focusedInputType AString r=hsivonen

nsIDOMWindowUtils.focusedInputType is necessary to check if IMEStateManager
sets InputContext of widget properly.  So, let's keep it but make its type
AString (nsAString&) rather than string (char**).

MozReview-Commit-ID: 1RHhmAsPY5a

--HG--
extra : rebase_source : 1e3ed6fa36028f2883cc37b0f2f1ff1f0eb23fd4
This commit is contained in:
Masayuki Nakano 2018-02-07 15:16:41 +09:00
parent 73774a4b98
commit 55ae27327e
2 changed files with 3 additions and 6 deletions

View File

@ -1819,17 +1819,14 @@ nsDOMWindowUtils::GetIMEStatus(uint32_t *aState)
}
NS_IMETHODIMP
nsDOMWindowUtils::GetFocusedInputType(char** aType)
nsDOMWindowUtils::GetFocusedInputType(nsAString& aType)
{
NS_ENSURE_ARG_POINTER(aType);
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget) {
return NS_ERROR_FAILURE;
}
InputContext context = widget->GetInputContext();
*aType = ToNewCString(context.mHTMLInputType);
aType = widget->GetInputContext().mHTMLInputType;
return NS_OK;
}

View File

@ -1512,7 +1512,7 @@ interface nsIDOMWindowUtils : nsISupports {
/**
* Get the type of the currently focused html input, if any.
*/
readonly attribute string focusedInputType;
readonly attribute AString focusedInputType;
/**
* Find the view ID for a given element. This is the reverse of