Bug 1330228 - Use HasBeenTypePassword to skip saving to presentation state. r=baku

Differential Revision: https://phabricator.services.mozilla.com/D15148
This commit is contained in:
Matthew Noorenberghe
2018-12-21 16:44:37 +00:00
parent 0ac1ff58ea
commit 16c226e794
6 changed files with 99 additions and 3 deletions

View File

@@ -5824,11 +5824,11 @@ HTMLInputElement::SaveState() {
case VALUE_MODE_VALUE:
case VALUE_MODE_DEFAULT:
// VALUE_MODE_DEFAULT shouldn't have their value saved except 'hidden',
// mType shouldn't be NS_FORM_INPUT_PASSWORD and value should have
// changed.
// mType should have never been NS_FORM_INPUT_PASSWORD and value should
// have changed.
if ((GetValueMode() == VALUE_MODE_DEFAULT &&
mType != NS_FORM_INPUT_HIDDEN) ||
mType == NS_FORM_INPUT_PASSWORD || !mValueChanged) {
mHasBeenTypePassword || !mValueChanged) {
break;
}