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

Side by Side Diff: Source/core/html/HTMLInputElement.h

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/HTMLImageElement.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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // 'indeterminate' is a state independent of the checked state that causes t he control to draw in a way that hides the actual state. 127 // 'indeterminate' is a state independent of the checked state that causes t he control to draw in a way that hides the actual state.
128 bool indeterminate() const { return m_isIndeterminate; } 128 bool indeterminate() const { return m_isIndeterminate; }
129 void setIndeterminate(bool); 129 void setIndeterminate(bool);
130 // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state 130 // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
131 bool shouldAppearChecked() const; 131 bool shouldAppearChecked() const;
132 virtual bool shouldAppearIndeterminate() const OVERRIDE; 132 virtual bool shouldAppearIndeterminate() const OVERRIDE;
133 133
134 int size() const; 134 int size() const;
135 bool sizeShouldIncludeDecoration(int& preferredSize) const; 135 bool sizeShouldIncludeDecoration(int& preferredSize) const;
136 136
137 void setType(const String&); 137 void setType(const AtomicString&);
138 138
139 String value() const; 139 String value() const;
140 void setValue(const String&, ExceptionState&, TextFieldEventBehavior = Dispa tchNoEvent); 140 void setValue(const String&, ExceptionState&, TextFieldEventBehavior = Dispa tchNoEvent);
141 void setValue(const String&, TextFieldEventBehavior = DispatchNoEvent); 141 void setValue(const String&, TextFieldEventBehavior = DispatchNoEvent);
142 void setValueForUser(const String&); 142 void setValueForUser(const String&);
143 // Checks if the specified string would be a valid value. 143 // Checks if the specified string would be a valid value.
144 // We should not call this for types with no string value such as CHECKBOX a nd RADIO. 144 // We should not call this for types with no string value such as CHECKBOX a nd RADIO.
145 bool isValidValue(const String&) const; 145 bool isValidValue(const String&) const;
146 bool hasDirtyValue() const { return !m_valueIfDirty.isNull(); }; 146 bool hasDirtyValue() const { return !m_valueIfDirty.isNull(); };
147 147
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV I-idiom here by making 183 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV I-idiom here by making
184 // it private virtual in all classes and expose a public method in HTMLFormC ontrolElement to call 184 // it private virtual in all classes and expose a public method in HTMLFormC ontrolElement to call
185 // the private virtual method. 185 // the private virtual method.
186 virtual bool isActivatedSubmit() const; 186 virtual bool isActivatedSubmit() const;
187 virtual void setActivatedSubmit(bool flag); 187 virtual void setActivatedSubmit(bool flag);
188 188
189 String altText() const; 189 String altText() const;
190 190
191 int maxResults() const { return m_maxResults; } 191 int maxResults() const { return m_maxResults; }
192 192
193 String defaultValue() const; 193 const AtomicString& defaultValue() const;
194 void setDefaultValue(const String&); 194 void setDefaultValue(const AtomicString&);
195 195
196 Vector<String> acceptMIMETypes(); 196 Vector<String> acceptMIMETypes();
197 Vector<String> acceptFileExtensions(); 197 Vector<String> acceptFileExtensions();
198 String accept() const; 198 const AtomicString& accept() const;
199 String alt() const; 199 const AtomicString& alt() const;
200 200
201 void setSize(unsigned); 201 void setSize(unsigned);
202 void setSize(unsigned, ExceptionState&); 202 void setSize(unsigned, ExceptionState&);
203 203
204 KURL src() const; 204 KURL src() const;
205 205
206 virtual int maxLength() const; 206 virtual int maxLength() const;
207 void setMaxLength(int, ExceptionState&); 207 void setMaxLength(int, ExceptionState&);
208 208
209 bool multiple() const; 209 bool multiple() const;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // that it lives as long as its owning element lives. If we move the loader into 402 // that it lives as long as its owning element lives. If we move the loader into
403 // the ImageInput object we may delete the loader while this element lives o n. 403 // the ImageInput object we may delete the loader while this element lives o n.
404 OwnPtr<HTMLImageLoader> m_imageLoader; 404 OwnPtr<HTMLImageLoader> m_imageLoader;
405 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver; 405 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver;
406 }; 406 };
407 407
408 DEFINE_NODE_TYPE_CASTS(HTMLInputElement, hasTagName(HTMLNames::inputTag)); 408 DEFINE_NODE_TYPE_CASTS(HTMLInputElement, hasTagName(HTMLNames::inputTag));
409 409
410 } //namespace 410 } //namespace
411 #endif 411 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698