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

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

Issue 289163003: Fix build with gcc 4.8 and C++11 support enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/dom/ContainerNode.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 m_disabled = !value.isNull(); 142 m_disabled = !value.isNull();
143 if (oldDisabled != m_disabled) 143 if (oldDisabled != m_disabled)
144 disabledAttributeChanged(); 144 disabledAttributeChanged();
145 } else if (name == readonlyAttr) { 145 } else if (name == readonlyAttr) {
146 bool wasReadOnly = m_isReadOnly; 146 bool wasReadOnly = m_isReadOnly;
147 m_isReadOnly = !value.isNull(); 147 m_isReadOnly = !value.isNull();
148 if (wasReadOnly != m_isReadOnly) { 148 if (wasReadOnly != m_isReadOnly) {
149 setNeedsWillValidateCheck(); 149 setNeedsWillValidateCheck();
150 setNeedsStyleRecalc(SubtreeStyleChange); 150 setNeedsStyleRecalc(SubtreeStyleChange);
151 if (renderer() && renderer()->style()->hasAppearance()) 151 if (renderer() && renderer()->style()->hasAppearance())
152 RenderTheme::theme().stateChanged(renderer(), ReadOnlyState); 152 RenderTheme::theme().stateChanged(renderer(), ReadOnlyControlSta te);
153 } 153 }
154 } else if (name == requiredAttr) { 154 } else if (name == requiredAttr) {
155 bool wasRequired = m_isRequired; 155 bool wasRequired = m_isRequired;
156 m_isRequired = !value.isNull(); 156 m_isRequired = !value.isNull();
157 if (wasRequired != m_isRequired) 157 if (wasRequired != m_isRequired)
158 requiredAttributeChanged(); 158 requiredAttributeChanged();
159 UseCounter::count(document(), UseCounter::RequiredAttribute); 159 UseCounter::count(document(), UseCounter::RequiredAttribute);
160 } else if (name == autofocusAttr) { 160 } else if (name == autofocusAttr) {
161 HTMLElement::parseAttribute(name, value); 161 HTMLElement::parseAttribute(name, value);
162 UseCounter::count(document(), UseCounter::AutoFocusAttribute); 162 UseCounter::count(document(), UseCounter::AutoFocusAttribute);
163 } else 163 } else
164 HTMLElement::parseAttribute(name, value); 164 HTMLElement::parseAttribute(name, value);
165 } 165 }
166 166
167 void HTMLFormControlElement::disabledAttributeChanged() 167 void HTMLFormControlElement::disabledAttributeChanged()
168 { 168 {
169 setNeedsWillValidateCheck(); 169 setNeedsWillValidateCheck();
170 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled); 170 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled);
171 if (renderer() && renderer()->style()->hasAppearance()) 171 if (renderer() && renderer()->style()->hasAppearance())
172 RenderTheme::theme().stateChanged(renderer(), EnabledState); 172 RenderTheme::theme().stateChanged(renderer(), EnabledControlState);
173 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this) { 173 if (isDisabledFormControl() && treeScope().adjustedFocusedElement() == this) {
174 // We might want to call blur(), but it's dangerous to dispatch events 174 // We might want to call blur(), but it's dangerous to dispatch events
175 // here. 175 // here.
176 document().setNeedsFocusedElementCheck(); 176 document().setNeedsFocusedElementCheck();
177 } 177 }
178 } 178 }
179 179
180 void HTMLFormControlElement::requiredAttributeChanged() 180 void HTMLFormControlElement::requiredAttributeChanged()
181 { 181 {
182 setNeedsValidityCheck(); 182 setNeedsValidityCheck();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 503
504 void HTMLFormControlElement::setFocus(bool flag) 504 void HTMLFormControlElement::setFocus(bool flag)
505 { 505 {
506 LabelableElement::setFocus(flag); 506 LabelableElement::setFocus(flag);
507 507
508 if (!flag && wasChangedSinceLastFormControlChangeEvent()) 508 if (!flag && wasChangedSinceLastFormControlChangeEvent())
509 dispatchFormControlChangeEvent(); 509 dispatchFormControlChangeEvent();
510 } 510 }
511 511
512 } // namespace Webcore 512 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698