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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 for (unsigned i = 0; i < elements.size(); ++i) { | 69 for (unsigned i = 0; i < elements.size(); ++i) { |
70 if (elements[i]->isFormControlElement()) { | 70 if (elements[i]->isFormControlElement()) { |
71 HTMLFormControlElement* control = toHTMLFormControlElement(elements[
i].get()); | 71 HTMLFormControlElement* control = toHTMLFormControlElement(elements[
i].get()); |
72 if (!control->checkValidity(0, CheckValidityDispatchNoEvent)) | 72 if (!control->checkValidity(0, CheckValidityDispatchNoEvent)) |
73 return false; | 73 return false; |
74 } | 74 } |
75 } | 75 } |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
| 79 void HTMLFieldSetElement::setNeedsValidityCheck() |
| 80 { |
| 81 // For now unconditionally order style recalculation, which triggers |
| 82 // validity recalculation. In the near future, consider implement validity |
| 83 // cache and recalculate style only if it changed. |
| 84 pseudoStateChanged(CSSSelector::PseudoValid); |
| 85 pseudoStateChanged(CSSSelector::PseudoInvalid); |
| 86 } |
| 87 |
79 void HTMLFieldSetElement::invalidateDisabledStateUnder(Element& base) | 88 void HTMLFieldSetElement::invalidateDisabledStateUnder(Element& base) |
80 { | 89 { |
81 for (HTMLFormControlElement& element : Traversal<HTMLFormControlElement>::de
scendantsOf(base)) | 90 for (HTMLFormControlElement& element : Traversal<HTMLFormControlElement>::de
scendantsOf(base)) |
82 element.ancestorDisabledStateWasChanged(); | 91 element.ancestorDisabledStateWasChanged(); |
83 } | 92 } |
84 | 93 |
85 void HTMLFieldSetElement::disabledAttributeChanged() | 94 void HTMLFieldSetElement::disabledAttributeChanged() |
86 { | 95 { |
87 // This element must be updated before the style of nodes in its subtree get
s recalculated. | 96 // This element must be updated before the style of nodes in its subtree get
s recalculated. |
88 HTMLFormControlElement::disabledAttributeChanged(); | 97 HTMLFormControlElement::disabledAttributeChanged(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 154 } |
146 } | 155 } |
147 | 156 |
148 const FormAssociatedElement::List& HTMLFieldSetElement::associatedElements() con
st | 157 const FormAssociatedElement::List& HTMLFieldSetElement::associatedElements() con
st |
149 { | 158 { |
150 refreshElementsIfNeeded(); | 159 refreshElementsIfNeeded(); |
151 return m_associatedElements; | 160 return m_associatedElements; |
152 } | 161 } |
153 | 162 |
154 } // namespace | 163 } // namespace |
OLD | NEW |