| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return element->findFormAncestor(); | 117 return element->findFormAncestor(); |
| 118 | 118 |
| 119 return currentAssociatedForm; | 119 return currentAssociatedForm; |
| 120 } | 120 } |
| 121 | 121 |
| 122 void FormAssociatedElement::formRemovedFromTree(const Node* formRoot) | 122 void FormAssociatedElement::formRemovedFromTree(const Node* formRoot) |
| 123 { | 123 { |
| 124 ASSERT(m_form); | 124 ASSERT(m_form); |
| 125 if (toHTMLElement(this)->highestAncestor() == formRoot) | 125 if (toHTMLElement(this)->highestAncestor() == formRoot) |
| 126 return; | 126 return; |
| 127 RefPtr<HTMLElement> protector(toHTMLElement(this)); | |
| 128 setForm(0); | 127 setForm(0); |
| 129 } | 128 } |
| 130 | 129 |
| 131 void FormAssociatedElement::setForm(HTMLFormElement* newForm) | 130 void FormAssociatedElement::setForm(HTMLFormElement* newForm) |
| 132 { | 131 { |
| 133 if (m_form == newForm) | 132 if (m_form == newForm) |
| 134 return; | 133 return; |
| 135 willChangeForm(); | 134 willChangeForm(); |
| 136 if (m_form) | 135 if (m_form) |
| 137 m_form->removeFormElement(this); | 136 m_form->removeFormElement(this); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 , m_element(element) | 298 , m_element(element) |
| 300 { | 299 { |
| 301 } | 300 } |
| 302 | 301 |
| 303 void FormAttributeTargetObserver::idTargetChanged() | 302 void FormAttributeTargetObserver::idTargetChanged() |
| 304 { | 303 { |
| 305 m_element->formAttributeTargetChanged(); | 304 m_element->formAttributeTargetChanged(); |
| 306 } | 305 } |
| 307 | 306 |
| 308 } // namespace Webcore | 307 } // namespace Webcore |
| OLD | NEW |