Bug 1728537 - Part 1: Move SaveState out of nsIFormControl; r=smaug

And make it return void as the return value isn't used at callsites.

Differential Revision: https://phabricator.services.mozilla.com/D124179
This commit is contained in:
Edgar Chen
2021-09-01 16:51:58 +00:00
parent 4b2047af0a
commit 3f6076d6b0
10 changed files with 40 additions and 53 deletions

View File

@@ -1249,13 +1249,10 @@ EventStates HTMLSelectElement::IntrinsicState() const {
return state;
}
// nsIFormControl
NS_IMETHODIMP
HTMLSelectElement::SaveState() {
void HTMLSelectElement::SaveState() {
PresState* presState = GetPrimaryPresState();
if (!presState) {
return NS_OK;
return;
}
SelectContentData state;
@@ -1283,10 +1280,10 @@ HTMLSelectElement::SaveState() {
presState->disabled() = HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
presState->disabledSet() = true;
}
return NS_OK;
}
// nsIFormControl
bool HTMLSelectElement::RestoreState(PresState* aState) {
// Get the presentation state object to retrieve our stuff out of.
const PresContentData& state = aState->contentData();