# HG changeset patch # User Makoto Kato # Date 1601537039 0 # Thu Oct 01 07:23:59 2020 +0000 # Node ID 3b746525d6472490b44e55e4766078372e0380c3 # Parent e6b1234900b328782dd4f93b34222bf49b470ac2 Bug 1661617 - Use password hint for software keyboard. r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D91237 diff -r e6b1234900b3 -r 3b746525d647 dom/events/IMEStateManager.cpp --- a/dom/events/IMEStateManager.cpp Thu Oct 08 05:39:33 2020 +0000 +++ b/dom/events/IMEStateManager.cpp Thu Oct 01 07:23:59 2020 +0000 @@ -1260,7 +1260,13 @@ } if (aContent->IsHTMLElement(nsGkAtoms::input)) { - HTMLInputElement::FromNode(aContent)->GetType(context.mHTMLInputType); + HTMLInputElement* inputElement = HTMLInputElement::FromNode(aContent); + if (inputElement->HasBeenTypePassword() && aState.IsEditable()) { + context.mHTMLInputType.AssignLiteral("password"); + } else { + inputElement->GetType(context.mHTMLInputType); + } + GetActionHint(*aContent, context.mActionHint); } else if (aContent->IsHTMLElement(nsGkAtoms::textarea)) { context.mHTMLInputType.Assign(nsGkAtoms::textarea->GetUTF16String());