| 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;
|
| }
|
|
|
|
|