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

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

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed Created 4 years, 6 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 } 173 }
174 174
175 void HTMLFormControlElement::disabledAttributeChanged() 175 void HTMLFormControlElement::disabledAttributeChanged()
176 { 176 {
177 setNeedsWillValidateCheck(); 177 setNeedsWillValidateCheck();
178 pseudoStateChanged(CSSSelector::PseudoDisabled); 178 pseudoStateChanged(CSSSelector::PseudoDisabled);
179 pseudoStateChanged(CSSSelector::PseudoEnabled); 179 pseudoStateChanged(CSSSelector::PseudoEnabled);
180 if (layoutObject()) 180 if (layoutObject())
181 LayoutTheme::theme().controlStateChanged(*layoutObject(), EnabledControl State); 181 LayoutTheme::theme().controlStateChanged(*layoutObject(), EnabledControl State);
182 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this) { 182 if (isDisabledFormControl() && adjustedFocusedElementInTreeScope() == this) {
183 // We might want to call blur(), but it's dangerous to dispatch events 183 // We might want to call blur(), but it's dangerous to dispatch events
184 // here. 184 // here.
185 document().setNeedsFocusedElementCheck(); 185 document().setNeedsFocusedElementCheck();
186 } 186 }
187 } 187 }
188 188
189 void HTMLFormControlElement::requiredAttributeChanged() 189 void HTMLFormControlElement::requiredAttributeChanged()
190 { 190 {
191 setNeedsValidityCheck(); 191 setNeedsValidityCheck();
192 pseudoStateChanged(CSSSelector::PseudoRequired); 192 pseudoStateChanged(CSSSelector::PseudoRequired);
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 dispatchFormControlChangeEvent(); 654 dispatchFormControlChangeEvent();
655 } 655 }
656 656
657 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element & source) 657 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element & source)
658 { 658 {
659 HTMLElement::copyNonAttributePropertiesFromElement(source); 659 HTMLElement::copyNonAttributePropertiesFromElement(source);
660 setNeedsValidityCheck(); 660 setNeedsValidityCheck();
661 } 661 }
662 662
663 } // namespace blink 663 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp ('k') | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698