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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLElement.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } else 152 } else
153 HTMLElement::parseAttribute(name, value); 153 HTMLElement::parseAttribute(name, value);
154 } 154 }
155 155
156 void HTMLFormControlElement::disabledAttributeChanged() 156 void HTMLFormControlElement::disabledAttributeChanged()
157 { 157 {
158 setNeedsWillValidateCheck(); 158 setNeedsWillValidateCheck();
159 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled); 159 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled);
160 if (renderer() && renderer()->style()->hasAppearance()) 160 if (renderer() && renderer()->style()->hasAppearance())
161 RenderTheme::theme().stateChanged(renderer(), EnabledState); 161 RenderTheme::theme().stateChanged(renderer(), EnabledState);
162 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this) { 162 if (isDisabledFormControl() && treeScope()->adjustedFocusedElement() == this ) {
163 // We might want to call blur(), but it's dangerous to dispatch events 163 // We might want to call blur(), but it's dangerous to dispatch events
164 // here. 164 // here.
165 document().setNeedsFocusedElementCheck(); 165 document().setNeedsFocusedElementCheck();
166 } 166 }
167 } 167 }
168 168
169 void HTMLFormControlElement::requiredAttributeChanged() 169 void HTMLFormControlElement::requiredAttributeChanged()
170 { 170 {
171 setNeedsValidityCheck(); 171 setNeedsValidityCheck();
172 // Style recalculation is needed because style selectors may include 172 // Style recalculation is needed because style selectors may include
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node) 485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node)
486 { 486 {
487 for (; node; node = node->parentNode()) { 487 for (; node; node = node->parentNode()) {
488 if (node->isElementNode() && toElement(node)->isFormControlElement()) 488 if (node->isElementNode() && toElement(node)->isFormControlElement())
489 return toHTMLFormControlElement(node); 489 return toHTMLFormControlElement(node);
490 } 490 }
491 return 0; 491 return 0;
492 } 492 }
493 493
494 } // namespace Webcore 494 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698