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

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

Issue 540533004: Use style invalidation for more pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 3 months 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 | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698