| 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, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2010 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void HTMLFieldSetElement::disabledAttributeChanged() | 60 void HTMLFieldSetElement::disabledAttributeChanged() |
| 61 { | 61 { |
| 62 // This element must be updated before the style of nodes in its subtree get
s recalculated. | 62 // This element must be updated before the style of nodes in its subtree get
s recalculated. |
| 63 HTMLFormControlElement::disabledAttributeChanged(); | 63 HTMLFormControlElement::disabledAttributeChanged(); |
| 64 invalidateDisabledStateUnder(this); | 64 invalidateDisabledStateUnder(this); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void HTMLFieldSetElement::childrenChanged(bool changedByParser, Node* beforeChan
ge, Node* afterChange, int childCountDelta) | 67 void HTMLFieldSetElement::childrenChanged(bool changedByParser, Node* beforeChan
ge, Node* afterChange, int childCountDelta) |
| 68 { | 68 { |
| 69 HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, after
Change, childCountDelta); | 69 HTMLFormControlElement::childrenChanged(changedByParser, beforeChange, after
Change, childCountDelta); |
| 70 for (Element* element = ElementTraversal::firstWithin(this); element; elemen
t = ElementTraversal::nextSkippingChildren(element, this)) { | 70 for (Element* element = ElementTraversal::firstWithin(this); element; elemen
t = ElementTraversal::nextSkippingChildren(*element, this)) { |
| 71 if (element->hasTagName(legendTag)) | 71 if (element->hasTagName(legendTag)) |
| 72 invalidateDisabledStateUnder(element); | 72 invalidateDisabledStateUnder(element); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool HTMLFieldSetElement::supportsFocus() const | 76 bool HTMLFieldSetElement::supportsFocus() const |
| 77 { | 77 { |
| 78 return HTMLElement::supportsFocus(); | 78 return HTMLElement::supportsFocus(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 const AtomicString& HTMLFieldSetElement::formControlType() const | 81 const AtomicString& HTMLFieldSetElement::formControlType() const |
| 82 { | 82 { |
| 83 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString:
:ConstructFromLiteral)); | 83 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString:
:ConstructFromLiteral)); |
| 84 return fieldset; | 84 return fieldset; |
| 85 } | 85 } |
| 86 | 86 |
| 87 RenderObject* HTMLFieldSetElement::createRenderer(RenderStyle*) | 87 RenderObject* HTMLFieldSetElement::createRenderer(RenderStyle*) |
| 88 { | 88 { |
| 89 return new RenderFieldset(this); | 89 return new RenderFieldset(this); |
| 90 } | 90 } |
| 91 | 91 |
| 92 HTMLLegendElement* HTMLFieldSetElement::legend() const | 92 HTMLLegendElement* HTMLFieldSetElement::legend() const |
| 93 { | 93 { |
| 94 for (Element* child = ElementTraversal::firstWithin(this); child; child = El
ementTraversal::nextSkippingChildren(child, this)) { | 94 for (Element* child = ElementTraversal::firstWithin(this); child; child = El
ementTraversal::nextSkippingChildren(*child, this)) { |
| 95 if (child->hasTagName(legendTag)) | 95 if (child->hasTagName(legendTag)) |
| 96 return toHTMLLegendElement(child); | 96 return toHTMLLegendElement(child); |
| 97 } | 97 } |
| 98 return 0; | 98 return 0; |
| 99 } | 99 } |
| 100 | 100 |
| 101 PassRefPtr<HTMLCollection> HTMLFieldSetElement::elements() | 101 PassRefPtr<HTMLCollection> HTMLFieldSetElement::elements() |
| 102 { | 102 { |
| 103 return ensureCachedHTMLCollection(FormControls); | 103 return ensureCachedHTMLCollection(FormControls); |
| 104 } | 104 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 { | 136 { |
| 137 refreshElementsIfNeeded(); | 137 refreshElementsIfNeeded(); |
| 138 unsigned len = 0; | 138 unsigned len = 0; |
| 139 for (unsigned i = 0; i < m_associatedElements.size(); ++i) | 139 for (unsigned i = 0; i < m_associatedElements.size(); ++i) |
| 140 if (m_associatedElements[i]->isEnumeratable()) | 140 if (m_associatedElements[i]->isEnumeratable()) |
| 141 ++len; | 141 ++len; |
| 142 return len; | 142 return len; |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace | 145 } // namespace |
| OLD | NEW |