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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/InputType.cpp ('k') | Source/core/html/canvas/CanvasGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/NumberInputType.cpp
diff --git a/Source/core/html/NumberInputType.cpp b/Source/core/html/NumberInputType.cpp
index be73a859733ecd38fb0c1f9453c6a16bfa7302a3..6b49e0040d724ff4807e5920bdd768df9208cdfe 100644
--- a/Source/core/html/NumberInputType.cpp
+++ b/Source/core/html/NumberInputType.cpp
@@ -127,11 +127,11 @@ void NumberInputType::setValueAsDouble(double newValue, TextFieldEventBehavior e
// FIXME: We should use numeric_limits<double>::max for number input type.
const double floatMax = numeric_limits<float>::max();
if (newValue < -floatMax) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
if (newValue > floatMax) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
element()->setValue(serializeForNumberType(newValue), eventBehavior);
@@ -142,11 +142,11 @@ void NumberInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventB
// FIXME: We should use numeric_limits<double>::max for number input type.
const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max());
if (newValue < -floatMax) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
if (newValue > floatMax) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
element()->setValue(serializeForNumberType(newValue), eventBehavior);
« no previous file with comments | « Source/core/html/InputType.cpp ('k') | Source/core/html/canvas/CanvasGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698