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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/HTMLFrameOwnerElement.cpp ('k') | Source/core/html/HTMLMarqueeElement.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 7dc62502677f48226ee87616205103b341cfc912..6a8d07d9690673e4219d180d1bf8e7e233ad862f 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -530,7 +530,7 @@ bool HTMLInputElement::canHaveSelection() const
int HTMLInputElement::selectionStartForBinding(ExceptionState& es) const
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return 0;
}
return HTMLTextFormControlElement::selectionStart();
@@ -539,7 +539,7 @@ int HTMLInputElement::selectionStartForBinding(ExceptionState& es) const
int HTMLInputElement::selectionEndForBinding(ExceptionState& es) const
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return 0;
}
return HTMLTextFormControlElement::selectionEnd();
@@ -548,7 +548,7 @@ int HTMLInputElement::selectionEndForBinding(ExceptionState& es) const
String HTMLInputElement::selectionDirectionForBinding(ExceptionState& es) const
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return String();
}
return HTMLTextFormControlElement::selectionDirection();
@@ -557,7 +557,7 @@ String HTMLInputElement::selectionDirectionForBinding(ExceptionState& es) const
void HTMLInputElement::setSelectionStartForBinding(int start, ExceptionState& es)
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
HTMLTextFormControlElement::setSelectionStart(start);
@@ -566,7 +566,7 @@ void HTMLInputElement::setSelectionStartForBinding(int start, ExceptionState& es
void HTMLInputElement::setSelectionEndForBinding(int end, ExceptionState& es)
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
HTMLTextFormControlElement::setSelectionEnd(end);
@@ -575,7 +575,7 @@ void HTMLInputElement::setSelectionEndForBinding(int end, ExceptionState& es)
void HTMLInputElement::setSelectionDirectionForBinding(const String& direction, ExceptionState& es)
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
HTMLTextFormControlElement::setSelectionDirection(direction);
@@ -584,7 +584,7 @@ void HTMLInputElement::setSelectionDirectionForBinding(const String& direction,
void HTMLInputElement::setSelectionRangeForBinding(int start, int end, ExceptionState& es)
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
HTMLTextFormControlElement::setSelectionRange(start, end);
@@ -593,7 +593,7 @@ void HTMLInputElement::setSelectionRangeForBinding(int start, int end, Exception
void HTMLInputElement::setSelectionRangeForBinding(int start, int end, const String& direction, ExceptionState& es)
{
if (!canHaveSelection()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
HTMLTextFormControlElement::setSelectionRange(start, end, direction);
@@ -1005,7 +1005,7 @@ void HTMLInputElement::setEditingValue(const String& value)
void HTMLInputElement::setValue(const String& value, ExceptionState& es, TextFieldEventBehavior eventBehavior)
{
if (isFileUpload() && !value.isEmpty()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
setValue(value, eventBehavior);
@@ -1061,7 +1061,7 @@ double HTMLInputElement::valueAsNumber() const
void HTMLInputElement::setValueAsNumber(double newValue, ExceptionState& es, TextFieldEventBehavior eventBehavior)
{
if (!std::isfinite(newValue)) {
- es.throwDOMException(NotSupportedError);
+ es.throwUninformativeAndGenericDOMException(NotSupportedError);
return;
}
m_inputType->setValueAsDouble(newValue, eventBehavior, es);
@@ -1296,7 +1296,7 @@ int HTMLInputElement::maxLength() const
void HTMLInputElement::setMaxLength(int maxLength, ExceptionState& es)
{
if (maxLength < 0)
- es.throwDOMException(IndexSizeError);
+ es.throwUninformativeAndGenericDOMException(IndexSizeError);
else
setAttribute(maxlengthAttr, String::number(maxLength));
}
@@ -1314,7 +1314,7 @@ void HTMLInputElement::setSize(unsigned size)
void HTMLInputElement::setSize(unsigned size, ExceptionState& es)
{
if (!size)
- es.throwDOMException(IndexSizeError);
+ es.throwUninformativeAndGenericDOMException(IndexSizeError);
else
setSize(size);
}
@@ -1808,7 +1808,7 @@ void ListAttributeTargetObserver::idTargetChanged()
void HTMLInputElement::setRangeText(const String& replacement, ExceptionState& es)
{
if (!m_inputType->supportsSelectionAPI()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
@@ -1818,7 +1818,7 @@ void HTMLInputElement::setRangeText(const String& replacement, ExceptionState& e
void HTMLInputElement::setRangeText(const String& replacement, unsigned start, unsigned end, const String& selectionMode, ExceptionState& es)
{
if (!m_inputType->supportsSelectionAPI()) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/html/HTMLMarqueeElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698