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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } else if (name == disabledAttr) { | 165 } else if (name == disabledAttr) { |
166 bool oldDisabled = m_disabled; | 166 bool oldDisabled = m_disabled; |
167 m_disabled = !value.isNull(); | 167 m_disabled = !value.isNull(); |
168 if (oldDisabled != m_disabled) | 168 if (oldDisabled != m_disabled) |
169 disabledAttributeChanged(); | 169 disabledAttributeChanged(); |
170 } else if (name == readonlyAttr) { | 170 } else if (name == readonlyAttr) { |
171 bool wasReadOnly = m_isReadOnly; | 171 bool wasReadOnly = m_isReadOnly; |
172 m_isReadOnly = !value.isNull(); | 172 m_isReadOnly = !value.isNull(); |
173 if (wasReadOnly != m_isReadOnly) { | 173 if (wasReadOnly != m_isReadOnly) { |
174 setNeedsWillValidateCheck(); | 174 setNeedsWillValidateCheck(); |
175 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing:
:fromAttribute(name)); | 175 pseudoStateChanged(CSSSelector::PseudoReadOnly); |
| 176 pseudoStateChanged(CSSSelector::PseudoReadWrite); |
176 if (layoutObject()) | 177 if (layoutObject()) |
177 LayoutTheme::theme().controlStateChanged(*layoutObject(), ReadOn
lyControlState); | 178 LayoutTheme::theme().controlStateChanged(*layoutObject(), ReadOn
lyControlState); |
178 } | 179 } |
179 } else if (name == requiredAttr) { | 180 } else if (name == requiredAttr) { |
180 bool wasRequired = m_isRequired; | 181 bool wasRequired = m_isRequired; |
181 m_isRequired = !value.isNull(); | 182 m_isRequired = !value.isNull(); |
182 if (wasRequired != m_isRequired) | 183 if (wasRequired != m_isRequired) |
183 requiredAttributeChanged(); | 184 requiredAttributeChanged(); |
184 UseCounter::count(document(), UseCounter::RequiredAttribute); | 185 UseCounter::count(document(), UseCounter::RequiredAttribute); |
185 } else if (name == autofocusAttr) { | 186 } else if (name == autofocusAttr) { |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 dispatchFormControlChangeEvent(); | 663 dispatchFormControlChangeEvent(); |
663 } | 664 } |
664 | 665 |
665 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) | 666 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) |
666 { | 667 { |
667 HTMLElement::copyNonAttributePropertiesFromElement(source); | 668 HTMLElement::copyNonAttributePropertiesFromElement(source); |
668 setNeedsValidityCheck(); | 669 setNeedsValidityCheck(); |
669 } | 670 } |
670 | 671 |
671 } // namespace blink | 672 } // namespace blink |
OLD | NEW |