Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: Source/core/html/FormAssociatedElement.cpp

Issue 672163002: Fix bug where form/fieldset :valid/:invalid won't be recalculated upon control's willValidate change Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout tests to catch the problem Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/FormAssociatedElement.cpp
diff --git a/Source/core/html/FormAssociatedElement.cpp b/Source/core/html/FormAssociatedElement.cpp
index 0b289f99ee96ed5faf87a16c2761f6e7f943aec6..4e0c19a5ee7b6e795e070465856e1ffa1c5bcb8e 100644
--- a/Source/core/html/FormAssociatedElement.cpp
+++ b/Source/core/html/FormAssociatedElement.cpp
@@ -149,6 +149,11 @@ void FormAssociatedElement::setForm(HTMLFormElement* newForm)
if (m_form.get() == newForm)
return;
willChangeForm();
+#if ENABLE(OILPAN)
+ HTMLFormElement* oldForm = m_form;
+#else
+ HTMLFormElement* oldForm = m_form.get();
+#endif
if (m_form)
m_form->disassociate(*this);
if (newForm) {
@@ -165,14 +170,14 @@ void FormAssociatedElement::setForm(HTMLFormElement* newForm)
m_form = WeakPtr<HTMLFormElement>();
#endif
}
- didChangeForm();
+ didChangeForm(oldForm);
}
void FormAssociatedElement::willChangeForm()
{
}
-void FormAssociatedElement::didChangeForm()
+void FormAssociatedElement::didChangeForm(HTMLFormElement* oldForm)
{
}

Powered by Google App Engine
This is Rietveld 408576698