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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 } else | 152 } else |
153 HTMLElement::parseAttribute(name, value); | 153 HTMLElement::parseAttribute(name, value); |
154 } | 154 } |
155 | 155 |
156 void HTMLFormControlElement::disabledAttributeChanged() | 156 void HTMLFormControlElement::disabledAttributeChanged() |
157 { | 157 { |
158 setNeedsWillValidateCheck(); | 158 setNeedsWillValidateCheck(); |
159 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled); | 159 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled); |
160 if (renderer() && renderer()->style()->hasAppearance()) | 160 if (renderer() && renderer()->style()->hasAppearance()) |
161 RenderTheme::theme().stateChanged(renderer(), EnabledState); | 161 RenderTheme::theme().stateChanged(renderer(), EnabledState); |
162 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this)
{ | 162 if (isDisabledFormControl() && treeScope()->adjustedFocusedElement() == this
) { |
163 // We might want to call blur(), but it's dangerous to dispatch events | 163 // We might want to call blur(), but it's dangerous to dispatch events |
164 // here. | 164 // here. |
165 document().setNeedsFocusedElementCheck(); | 165 document().setNeedsFocusedElementCheck(); |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 void HTMLFormControlElement::requiredAttributeChanged() | 169 void HTMLFormControlElement::requiredAttributeChanged() |
170 { | 170 { |
171 setNeedsValidityCheck(); | 171 setNeedsValidityCheck(); |
172 // Style recalculation is needed because style selectors may include | 172 // Style recalculation is needed because style selectors may include |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) | 485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) |
486 { | 486 { |
487 for (; node; node = node->parentNode()) { | 487 for (; node; node = node->parentNode()) { |
488 if (node->isElementNode() && toElement(node)->isFormControlElement()) | 488 if (node->isElementNode() && toElement(node)->isFormControlElement()) |
489 return toHTMLFormControlElement(node); | 489 return toHTMLFormControlElement(node); |
490 } | 490 } |
491 return 0; | 491 return 0; |
492 } | 492 } |
493 | 493 |
494 } // namespace Webcore | 494 } // namespace Webcore |
OLD | NEW |