| 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 |
| 133 void FormAssociatedElement::formRemovedFromTree(const Node& formRoot) | 138 void FormAssociatedElement::formRemovedFromTree(const Node& formRoot) |
| 134 { | 139 { |
| 135 ASSERT(m_form); | 140 ASSERT(m_form); |
| 136 if (NodeTraversal::highestAncestorOrSelf(toHTMLElement(*this)) == formRoot) | 141 if (NodeTraversal::highestAncestorOrSelf(toHTMLElement(*this)) == formRoot) |
| 137 return; | 142 return; |
| 138 resetFormOwner(); | 143 resetFormOwner(); |
| 139 } | 144 } |
| 140 | 145 |
| 141 void FormAssociatedElement::associateByParser(HTMLFormElement* form) | 146 void FormAssociatedElement::associateByParser(HTMLFormElement* form) |
| 142 { | 147 { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 visitor->trace(m_element); | 354 visitor->trace(m_element); |
| 350 IdTargetObserver::trace(visitor); | 355 IdTargetObserver::trace(visitor); |
| 351 } | 356 } |
| 352 | 357 |
| 353 void FormAttributeTargetObserver::idTargetChanged() | 358 void FormAttributeTargetObserver::idTargetChanged() |
| 354 { | 359 { |
| 355 m_element->formAttributeTargetChanged(); | 360 m_element->formAttributeTargetChanged(); |
| 356 } | 361 } |
| 357 | 362 |
| 358 } // namespace blink | 363 } // namespace blink |
| OLD | NEW |