HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 May 2012 09:54:00 +0000 (09:54 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 May 2012 09:54:00 +0000 (09:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87608

Reviewed by Kent Tamura.

Moved m_validationMessage clearance from detach() to removedFrom() and
remove detach().

No new tests. This change has no visible difference. Upcoming changes rely on this though.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::removedFrom):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118664 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h

index e2e932e..da43e0e 100644 (file)
@@ -1,3 +1,18 @@
+2012-05-28  MORITA Hajime  <morrita@google.com>
+
+        HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
+        https://bugs.webkit.org/show_bug.cgi?id=87608
+
+        Reviewed by Kent Tamura.
+
+        Moved m_validationMessage clearance from detach() to removedFrom() and
+        remove detach().
+
+        No new tests. This change has no visible difference. Upcoming changes rely on this though.
+
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::removedFrom):
+
 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
 
         Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling
index abb3610..e599cd1 100644 (file)
@@ -70,12 +70,6 @@ HTMLFormControlElement::~HTMLFormControlElement()
 {
 }
 
-void HTMLFormControlElement::detach()
-{
-    m_validationMessage = nullptr;
-    HTMLElement::detach();
-}
-
 String HTMLFormControlElement::formEnctype() const
 {
     return FormSubmission::Attributes::parseEncodingType(fastGetAttribute(formenctypeAttr));
@@ -233,6 +227,7 @@ Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Containe
 
 void HTMLFormControlElement::removedFrom(ContainerNode* insertionPoint)
 {
+    m_validationMessage = nullptr;
     m_fieldSetAncestorValid = false;
     m_dataListAncestorState = Unknown;
     HTMLElement::removedFrom(insertionPoint);
index 859c0f0..1748d08 100644 (file)
@@ -130,7 +130,6 @@ protected:
     virtual void didRecalcStyle(StyleChange) OVERRIDE;
 
     virtual void dispatchBlurEvent(PassRefPtr<Node> newFocusedNode);
-    virtual void detach();
 
     // This must be called any time the result of willValidate() has changed.
     void setNeedsWillValidateCheck();