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

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

Issue 131483008: Correctly report TypeError for HTML{Meter,Progress}Element setters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/HTMLMeterElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLProgressElement.cpp
diff --git a/Source/core/html/HTMLProgressElement.cpp b/Source/core/html/HTMLProgressElement.cpp
index 95dc7d5f29e46b274d7a22d772e38b47b419c385..e99cc862c990b8e78bb05801d2de1a921cd24d47 100644
--- a/Source/core/html/HTMLProgressElement.cpp
+++ b/Source/core/html/HTMLProgressElement.cpp
@@ -101,7 +101,7 @@ double HTMLProgressElement::value() const
void HTMLProgressElement::setValue(double value, ExceptionState& exceptionState)
{
if (!std::isfinite(value)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(value));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(value));
return;
}
setFloatingPointAttribute(valueAttr, std::max(value, 0.));
@@ -116,7 +116,7 @@ double HTMLProgressElement::max() const
void HTMLProgressElement::setMax(double max, ExceptionState& exceptionState)
{
if (!std::isfinite(max)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(max));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(max));
return;
}
// FIXME: The specification says we should ignore the input value if it is inferior or equal to 0.
« no previous file with comments | « Source/core/html/HTMLMeterElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698