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

Unified Diff: Source/core/html/HTMLInputElement.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/HTMLElement.cpp ('k') | Source/core/html/HTMLMediaElement.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 98647d0691684cd59a0c1d7f9a7e5bf2965f3673..7b377499e46a65fa2df09a6948ba4d91a90e51cf 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -553,7 +553,7 @@ bool HTMLInputElement::canHaveSelection() const
int HTMLInputElement::selectionStartForBinding(ExceptionCode& ec) const
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return 0;
}
return HTMLTextFormControlElement::selectionStart();
@@ -562,7 +562,7 @@ int HTMLInputElement::selectionStartForBinding(ExceptionCode& ec) const
int HTMLInputElement::selectionEndForBinding(ExceptionCode& ec) const
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return 0;
}
return HTMLTextFormControlElement::selectionEnd();
@@ -571,7 +571,7 @@ int HTMLInputElement::selectionEndForBinding(ExceptionCode& ec) const
String HTMLInputElement::selectionDirectionForBinding(ExceptionCode& ec) const
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return String();
}
return HTMLTextFormControlElement::selectionDirection();
@@ -580,7 +580,7 @@ String HTMLInputElement::selectionDirectionForBinding(ExceptionCode& ec) const
void HTMLInputElement::setSelectionStartForBinding(int start, ExceptionCode& ec)
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
HTMLTextFormControlElement::setSelectionStart(start);
@@ -589,7 +589,7 @@ void HTMLInputElement::setSelectionStartForBinding(int start, ExceptionCode& ec)
void HTMLInputElement::setSelectionEndForBinding(int end, ExceptionCode& ec)
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
HTMLTextFormControlElement::setSelectionEnd(end);
@@ -598,7 +598,7 @@ void HTMLInputElement::setSelectionEndForBinding(int end, ExceptionCode& ec)
void HTMLInputElement::setSelectionDirectionForBinding(const String& direction, ExceptionCode& ec)
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
HTMLTextFormControlElement::setSelectionDirection(direction);
@@ -607,7 +607,7 @@ void HTMLInputElement::setSelectionDirectionForBinding(const String& direction,
void HTMLInputElement::setSelectionRangeForBinding(int start, int end, ExceptionCode& ec)
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
HTMLTextFormControlElement::setSelectionRange(start, end);
@@ -616,7 +616,7 @@ void HTMLInputElement::setSelectionRangeForBinding(int start, int end, Exception
void HTMLInputElement::setSelectionRangeForBinding(int start, int end, const String& direction, ExceptionCode& ec)
{
if (!canHaveSelection()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
HTMLTextFormControlElement::setSelectionRange(start, end, direction);
@@ -1027,7 +1027,7 @@ void HTMLInputElement::setEditingValue(const String& value)
void HTMLInputElement::setValue(const String& value, ExceptionCode& ec, TextFieldEventBehavior eventBehavior)
{
if (isFileUpload() && !value.isEmpty()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
setValue(value, eventBehavior);
@@ -1838,7 +1838,7 @@ void ListAttributeTargetObserver::idTargetChanged()
void HTMLInputElement::setRangeText(const String& replacement, ExceptionCode& ec)
{
if (!m_inputType->supportsSelectionAPI()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
@@ -1848,7 +1848,7 @@ void HTMLInputElement::setRangeText(const String& replacement, ExceptionCode& ec
void HTMLInputElement::setRangeText(const String& replacement, unsigned start, unsigned end, const String& selectionMode, ExceptionCode& ec)
{
if (!m_inputType->supportsSelectionAPI()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698