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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } else if (name == autofocusAttr) { | 164 } else if (name == autofocusAttr) { |
165 HTMLElement::parseAttribute(name, value); | 165 HTMLElement::parseAttribute(name, value); |
166 UseCounter::count(document(), UseCounter::AutoFocusAttribute); | 166 UseCounter::count(document(), UseCounter::AutoFocusAttribute); |
167 } else | 167 } else |
168 HTMLElement::parseAttribute(name, value); | 168 HTMLElement::parseAttribute(name, value); |
169 } | 169 } |
170 | 170 |
171 void HTMLFormControlElement::disabledAttributeChanged() | 171 void HTMLFormControlElement::disabledAttributeChanged() |
172 { | 172 { |
173 setNeedsWillValidateCheck(); | 173 setNeedsWillValidateCheck(); |
174 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled); | 174 pseudoStateChanged(CSSSelector::PseudoDisabled); |
| 175 pseudoStateChanged(CSSSelector::PseudoEnabled); |
175 if (renderer() && renderer()->style()->hasAppearance()) | 176 if (renderer() && renderer()->style()->hasAppearance()) |
176 RenderTheme::theme().stateChanged(renderer(), EnabledControlState); | 177 RenderTheme::theme().stateChanged(renderer(), EnabledControlState); |
177 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this)
{ | 178 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this)
{ |
178 // We might want to call blur(), but it's dangerous to dispatch events | 179 // We might want to call blur(), but it's dangerous to dispatch events |
179 // here. | 180 // here. |
180 document().setNeedsFocusedElementCheck(); | 181 document().setNeedsFocusedElementCheck(); |
181 } | 182 } |
182 } | 183 } |
183 | 184 |
184 void HTMLFormControlElement::requiredAttributeChanged() | 185 void HTMLFormControlElement::requiredAttributeChanged() |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 547 |
547 void HTMLFormControlElement::setFocus(bool flag) | 548 void HTMLFormControlElement::setFocus(bool flag) |
548 { | 549 { |
549 LabelableElement::setFocus(flag); | 550 LabelableElement::setFocus(flag); |
550 | 551 |
551 if (!flag && wasChangedSinceLastFormControlChangeEvent()) | 552 if (!flag && wasChangedSinceLastFormControlChangeEvent()) |
552 dispatchFormControlChangeEvent(); | 553 dispatchFormControlChangeEvent(); |
553 } | 554 } |
554 | 555 |
555 } // namespace blink | 556 } // namespace blink |
OLD | NEW |