Backed out changeset 08f12e7fa5f0 (bug 1556358) for causing bustage on ElementInternals.cpp. CLOSED TREE

This commit is contained in:
Natalia Csoregi
2023-06-19 21:15:17 +03:00
parent 7c0bfdb34a
commit 0b693ec882
15 changed files with 49 additions and 495 deletions

View File

@@ -1833,9 +1833,6 @@ nsresult nsGenericHTMLFormElement::BindToTree(BindContext& aContext,
}
void nsGenericHTMLFormElement::UnbindFromTree(bool aNullParent) {
// Save state before doing anything else.
SaveState();
if (IsFormAssociatedElement()) {
if (HTMLFormElement* form = GetFormInternal()) {
// Might need to unset form
@@ -2243,12 +2240,6 @@ void nsGenericHTMLFormElement::FieldSetDisabledChanged(bool aNotify) {
UpdateDisabledState(aNotify);
}
void nsGenericHTMLFormElement::SaveSubtreeState() {
SaveState();
nsGenericHTMLElement::SaveSubtreeState();
}
//----------------------------------------------------------------------
void nsGenericHTMLElement::Click(CallerType aCallerType) {
@@ -2582,6 +2573,12 @@ nsINode* nsGenericHTMLFormControlElement::GetScopeChainParent() const {
return mForm ? mForm : nsGenericHTMLElement::GetScopeChainParent();
}
void nsGenericHTMLFormControlElement::SaveSubtreeState() {
SaveState();
nsGenericHTMLFormElement::SaveSubtreeState();
}
nsIContent::IMEState nsGenericHTMLFormControlElement::GetDesiredIMEState() {
TextEditor* textEditor = GetTextEditorInternal();
if (!textEditor) {
@@ -2595,6 +2592,12 @@ nsIContent::IMEState nsGenericHTMLFormControlElement::GetDesiredIMEState() {
return state;
}
void nsGenericHTMLFormControlElement::UnbindFromTree(bool aNullParent) {
// Save state before doing anything
SaveState();
nsGenericHTMLFormElement::UnbindFromTree(aNullParent);
}
void nsGenericHTMLFormControlElement::GetAutocapitalize(
nsAString& aValue) const {
if (nsContentUtils::HasNonEmptyAttr(this, kNameSpaceID_None,
@@ -2959,7 +2962,7 @@ PresState* nsGenericHTMLFormControlElementWithState::GetPrimaryPresState() {
}
already_AddRefed<nsILayoutHistoryState>
nsGenericHTMLFormElement::GetLayoutHistory(bool aRead) {
nsGenericHTMLFormControlElementWithState::GetLayoutHistory(bool aRead) {
nsCOMPtr<Document> doc = GetUncomposedDoc();
if (!doc) {
return nullptr;