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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 84713002: Add number() static methods to AtomicString class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass NaN as default argument Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 61a3d3974d5510428fc1ae00e00f30a0857296ed..c35f154fd81cdb6d015e4ea478b9121db9dec279 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -1294,7 +1294,7 @@ void HTMLInputElement::setMaxLength(int maxLength, ExceptionState& exceptionStat
if (maxLength < 0)
exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
else
- setAttribute(maxlengthAttr, String::number(maxLength));
+ setIntegralAttribute(maxlengthAttr, maxLength);
}
bool HTMLInputElement::multiple() const
@@ -1304,7 +1304,7 @@ bool HTMLInputElement::multiple() const
void HTMLInputElement::setSize(unsigned size)
{
- setAttribute(sizeAttr, String::number(size));
+ setUnsignedIntegralAttribute(sizeAttr, size);
}
void HTMLInputElement::setSize(unsigned size, ExceptionState& exceptionState)
@@ -1766,12 +1766,12 @@ unsigned HTMLInputElement::width() const
void HTMLInputElement::setHeight(unsigned height)
{
- setAttribute(heightAttr, String::number(height));
+ setUnsignedIntegralAttribute(heightAttr, height);
}
void HTMLInputElement::setWidth(unsigned width)
{
- setAttribute(widthAttr, String::number(width));
+ setUnsignedIntegralAttribute(widthAttr, width);
}
PassOwnPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element)
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698