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:
@@ -54,7 +54,7 @@ static const nsAttrValue::EnumTable* kButtonDefaultType = &kButtonTypeTable[2];
|
||||
HTMLButtonElement::HTMLButtonElement(
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
FromParser aFromParser)
|
||||
: nsGenericHTMLFormElementWithState(std::move(aNodeInfo),
|
||||
: nsGenericHTMLFormElementWithState(std::move(aNodeInfo), aFromParser,
|
||||
kButtonDefaultType->value),
|
||||
mDisabledChanged(false),
|
||||
mInInternalActivate(false),
|
||||
@@ -345,8 +345,8 @@ HTMLButtonElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
|
||||
}
|
||||
|
||||
void HTMLButtonElement::DoneCreatingElement() {
|
||||
GenerateStateKey();
|
||||
if (!mInhibitStateRestoration) {
|
||||
GenerateStateKey();
|
||||
RestoreFormControlState();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user