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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 resetFormOwner(); | 89 resetFormOwner(); |
90 | 90 |
91 if (!insertionPoint->inDocument()) | 91 if (!insertionPoint->inDocument()) |
92 return; | 92 return; |
93 | 93 |
94 HTMLElement* element = toHTMLElement(this); | 94 HTMLElement* element = toHTMLElement(this); |
95 if (element->fastHasAttribute(formAttr)) | 95 if (element->fastHasAttribute(formAttr)) |
96 resetFormAttributeTargetObserver(); | 96 resetFormAttributeTargetObserver(); |
97 } | 97 } |
98 | 98 |
99 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint) | 99 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint, Node* nex
t) |
100 { | 100 { |
101 HTMLElement* element = toHTMLElement(this); | 101 HTMLElement* element = toHTMLElement(this); |
102 if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr)) { | 102 if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr)) { |
103 setFormAttributeTargetObserver(nullptr); | 103 setFormAttributeTargetObserver(nullptr); |
104 resetFormOwner(); | 104 resetFormOwner(); |
105 return; | 105 return; |
106 } | 106 } |
107 // If the form and element are both in the same tree, preserve the connectio
n to the form. | 107 // If the form and element are both in the same tree, preserve the connectio
n to the form. |
108 // Otherwise, null out our form and remove ourselves from the form's list of
elements. | 108 // Otherwise, null out our form and remove ourselves from the form's list of
elements. |
109 if (m_form && NodeTraversal::highestAncestorOrSelf(*element) != NodeTraversa
l::highestAncestorOrSelf(*m_form.get())) | 109 if (m_form && NodeTraversal::highestAncestorOrSelf(*element) != NodeTraversa
l::highestAncestorOrSelf(*m_form.get())) |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 visitor->trace(m_element); | 349 visitor->trace(m_element); |
350 IdTargetObserver::trace(visitor); | 350 IdTargetObserver::trace(visitor); |
351 } | 351 } |
352 | 352 |
353 void FormAttributeTargetObserver::idTargetChanged() | 353 void FormAttributeTargetObserver::idTargetChanged() |
354 { | 354 { |
355 m_element->formAttributeTargetChanged(); | 355 m_element->formAttributeTargetChanged(); |
356 } | 356 } |
357 | 357 |
358 } // namespace blink | 358 } // namespace blink |
OLD | NEW |