Bug 1375741 - Pass the correct argument to DoSetChecked() in HTMLInputElement::DoneCreatingElement() and AfterSetAttr() and delete the no-op DoSetCheckedChanged() call there to avoid doing excessive work; r=bzbarsky

This commit is contained in:
Ehsan Akhgari
2017-06-22 19:35:52 -04:00
parent f90f169093
commit 339835e85d

View File

@@ -1430,8 +1430,7 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
if (!mDoneCreating) {
mShouldInitChecked = true;
} else {
DoSetChecked(DefaultChecked(), true, true);
SetCheckedChanged(false);
DoSetChecked(DefaultChecked(), true, false);
}
}
@@ -6555,8 +6554,7 @@ HTMLInputElement::DoneCreatingElement()
// property.
//
if (!restoredCheckedState && mShouldInitChecked) {
DoSetChecked(DefaultChecked(), false, true);
DoSetCheckedChanged(false, false);
DoSetChecked(DefaultChecked(), false, false);
}
// Sanitize the value.