Chromium Code Reviews| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 138 |
| 139 void HTMLFormControlElement::attributeChanged( | 139 void HTMLFormControlElement::attributeChanged( |
| 140 const AttributeModificationParams& params) { | 140 const AttributeModificationParams& params) { |
| 141 HTMLElement::attributeChanged(params); | 141 HTMLElement::attributeChanged(params); |
| 142 if (params.name == disabledAttr && | 142 if (params.name == disabledAttr && |
| 143 params.oldValue.isNull() != params.newValue.isNull()) { | 143 params.oldValue.isNull() != params.newValue.isNull()) { |
| 144 disabledAttributeChanged(); | 144 disabledAttributeChanged(); |
| 145 if (params.reason == AttributeModificationReason::kDirectly && | 145 if (params.reason == AttributeModificationReason::kDirectly && |
| 146 isDisabledFormControl() && adjustedFocusedElementInTreeScope() == this) | 146 isDisabledFormControl() && adjustedFocusedElementInTreeScope() == this) |
| 147 blur(); | 147 blur(); |
| 148 } else if (params.name == readonlyAttr && | |
|
tkent
2017/02/03 00:09:58
I think no reason to handle this in HTMLFormContro
| |
| 149 params.oldValue.isNull() != params.newValue.isNull()) { | |
| 150 readonlyAttributeChanged(); | |
| 148 } | 151 } |
| 149 } | 152 } |
| 150 | 153 |
| 151 void HTMLFormControlElement::parseAttribute( | 154 void HTMLFormControlElement::parseAttribute( |
| 152 const AttributeModificationParams& params) { | 155 const AttributeModificationParams& params) { |
| 153 const QualifiedName& name = params.name; | 156 const QualifiedName& name = params.name; |
| 154 if (name == formAttr) { | 157 if (name == formAttr) { |
| 155 formAttributeChanged(); | 158 formAttributeChanged(); |
| 156 UseCounter::count(document(), UseCounter::FormAttribute); | 159 UseCounter::count(document(), UseCounter::FormAttribute); |
| 157 } else if (name == readonlyAttr) { | 160 } else if (name == readonlyAttr) { |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 const Element& source) { | 637 const Element& source) { |
| 635 HTMLElement::copyNonAttributePropertiesFromElement(source); | 638 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 636 setNeedsValidityCheck(); | 639 setNeedsValidityCheck(); |
| 637 } | 640 } |
| 638 | 641 |
| 639 void HTMLFormControlElement::associateWith(HTMLFormElement* form) { | 642 void HTMLFormControlElement::associateWith(HTMLFormElement* form) { |
| 640 associateByParser(form); | 643 associateByParser(form); |
| 641 }; | 644 }; |
| 642 | 645 |
| 643 } // namespace blink | 646 } // namespace blink |
| OLD | NEW |