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

Unified Diff: Source/core/html/InputType.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/HTMLVideoElement.cpp ('k') | Source/core/html/NumberInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/InputType.cpp
diff --git a/Source/core/html/InputType.cpp b/Source/core/html/InputType.cpp
index 665b6ae1d8cc499211519e262c5330a253bb25a7..8a6c3d4871b56e3ed5f1d63ae4982785382b864f 100644
--- a/Source/core/html/InputType.cpp
+++ b/Source/core/html/InputType.cpp
@@ -194,7 +194,7 @@ double InputType::valueAsDate() const
void InputType::setValueAsDate(double, ExceptionCode& ec) const
{
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
}
double InputType::valueAsDouble() const
@@ -209,7 +209,7 @@ void InputType::setValueAsDouble(double doubleValue, TextFieldEventBehavior even
void InputType::setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionCode& ec) const
{
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
}
bool InputType::supportsValidation() const
@@ -938,24 +938,24 @@ void InputType::applyStep(int count, AnyStepHandling anyStepHandling, TextFieldE
{
StepRange stepRange(createStepRange(anyStepHandling));
if (!stepRange.hasStep()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
const Decimal current = parseToNumberOrNaN(element()->value());
if (!current.isFinite()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
Decimal newValue = current + stepRange.step() * count;
if (!newValue.isFinite()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
const Decimal acceptableErrorValue = stepRange.acceptableError();
if (newValue - stepRange.minimum() < -acceptableErrorValue) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
if (newValue < stepRange.minimum())
@@ -966,7 +966,7 @@ void InputType::applyStep(int count, AnyStepHandling anyStepHandling, TextFieldE
newValue = stepRange.alignValueForStep(current, newValue);
if (newValue - stepRange.maximum() > acceptableErrorValue) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
if (newValue > stepRange.maximum())
@@ -994,7 +994,7 @@ StepRange InputType::createStepRange(AnyStepHandling) const
void InputType::stepUp(int n, ExceptionCode& ec)
{
if (!isSteppable()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
applyStep(n, RejectAny, DispatchNoEvent, ec);
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/core/html/NumberInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698