Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259
This commit is contained in:
@@ -939,7 +939,7 @@ void HTMLInputElement::Shutdown() {
|
||||
HTMLInputElement::HTMLInputElement(
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
FromParser aFromParser, FromClone aFromClone)
|
||||
: nsGenericHTMLFormElementWithState(std::move(aNodeInfo),
|
||||
: nsGenericHTMLFormElementWithState(std::move(aNodeInfo), aFromParser,
|
||||
kInputDefaultType->value),
|
||||
mAutocompleteAttrState(nsContentUtils::eAutocompleteAttrState_Unknown),
|
||||
mAutocompleteInfoState(nsContentUtils::eAutocompleteAttrState_Unknown),
|
||||
@@ -5894,11 +5894,8 @@ void HTMLInputElement::DoneCreatingElement() {
|
||||
// Restore state as needed. Note that disabled state applies to all control
|
||||
// types.
|
||||
//
|
||||
bool restoredCheckedState = false;
|
||||
if (!mInhibitRestoration) {
|
||||
GenerateStateKey();
|
||||
restoredCheckedState = RestoreFormControlState();
|
||||
}
|
||||
GenerateStateKey();
|
||||
bool restoredCheckedState = !mInhibitRestoration && RestoreFormControlState();
|
||||
|
||||
//
|
||||
// If restore does not occur, we initialize .checked using the CHECKED
|
||||
|
||||
Reference in New Issue
Block a user