| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // 3.2. Abort the "reset the form owner" steps. | 123 // 3.2. Abort the "reset the form owner" steps. |
| 124 Element* newFormCandidate = element->treeScope().getElementById(formId); | 124 Element* newFormCandidate = element->treeScope().getElementById(formId); |
| 125 return isHTMLFormElement(newFormCandidate) ? toHTMLFormElement(newFormCa
ndidate) : 0; | 125 return isHTMLFormElement(newFormCandidate) ? toHTMLFormElement(newFormCa
ndidate) : 0; |
| 126 } | 126 } |
| 127 // 4. Otherwise, if the form-associated element in question has an ancestor | 127 // 4. Otherwise, if the form-associated element in question has an ancestor |
| 128 // form element, then associate the form-associated element with the nearest | 128 // form element, then associate the form-associated element with the nearest |
| 129 // such ancestor form element. | 129 // such ancestor form element. |
| 130 return element->findFormAncestor(); | 130 return element->findFormAncestor(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 HTMLFormElement* FormAssociatedElement::form() const | |
| 134 { | |
| 135 return m_form.get(); | |
| 136 } | |
| 137 | |
| 138 void FormAssociatedElement::formRemovedFromTree(const Node& formRoot) | 133 void FormAssociatedElement::formRemovedFromTree(const Node& formRoot) |
| 139 { | 134 { |
| 140 ASSERT(m_form); | 135 ASSERT(m_form); |
| 141 if (NodeTraversal::highestAncestorOrSelf(toHTMLElement(*this)) == formRoot) | 136 if (NodeTraversal::highestAncestorOrSelf(toHTMLElement(*this)) == formRoot) |
| 142 return; | 137 return; |
| 143 resetFormOwner(); | 138 resetFormOwner(); |
| 144 } | 139 } |
| 145 | 140 |
| 146 void FormAssociatedElement::associateByParser(HTMLFormElement* form) | 141 void FormAssociatedElement::associateByParser(HTMLFormElement* form) |
| 147 { | 142 { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 visitor->trace(m_element); | 349 visitor->trace(m_element); |
| 355 IdTargetObserver::trace(visitor); | 350 IdTargetObserver::trace(visitor); |
| 356 } | 351 } |
| 357 | 352 |
| 358 void FormAttributeTargetObserver::idTargetChanged() | 353 void FormAttributeTargetObserver::idTargetChanged() |
| 359 { | 354 { |
| 360 m_element->formAttributeTargetChanged(); | 355 m_element->formAttributeTargetChanged(); |
| 361 } | 356 } |
| 362 | 357 |
| 363 } // namespace blink | 358 } // namespace blink |
| OLD | NEW |