Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp

Issue 1454003002: Use invalidation sets for :read-only and :read-write. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698