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

Unified Diff: WebCore/html/HTMLFormControlElement.cpp

Issue 6508002: Revert 78166 - Merge r77114 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « WebCore/html/HTMLFormControlElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/html/HTMLFormControlElement.cpp
===================================================================
--- WebCore/html/HTMLFormControlElement.cpp (revision 78370)
+++ WebCore/html/HTMLFormControlElement.cpp (working copy)
@@ -162,6 +162,7 @@
void HTMLFormControlElement::insertedIntoTree(bool deep)
{
if (fastHasAttribute(formAttr)) {
+ document()->registerFormElementWithFormAttribute(this);
Element* element = document()->getElementById(fastGetAttribute(formAttr));
if (element && element->hasTagName(formTag)) {
if (m_form)
@@ -195,6 +196,9 @@
void HTMLFormControlElement::removedFromTree(bool deep)
{
+ if (fastHasAttribute(formAttr))
+ document()->unregisterFormElementWithFormAttribute(this);
+
// If the form and element are both in the same tree, preserve the connection to the form.
// Otherwise, null out our form and remove ourselves from the form's list of elements.
if (m_form && findRoot(this) != findRoot(m_form)) {
@@ -205,18 +209,6 @@
HTMLElement::removedFromTree(deep);
}
-void HTMLFormControlElement::insertedIntoDocument()
-{
- if (fastHasAttribute(formAttr))
- document()->registerFormElementWithFormAttribute(this);
-}
-
-void HTMLFormControlElement::removedFromDocument()
-{
- if (fastHasAttribute(formAttr))
- document()->unregisterFormElementWithFormAttribute(this);
-}
-
const AtomicString& HTMLFormControlElement::formControlName() const
{
const AtomicString& name = fastGetAttribute(nameAttr);
« no previous file with comments | « WebCore/html/HTMLFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698